| 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
| 2 | |* *| |
| 3 | |* Attribute classes' definitions *| |
| 4 | |* *| |
| 5 | |* Automatically generated file, do not edit! *| |
| 6 | |* *| |
| 7 | \*===----------------------------------------------------------------------===*/ |
| 8 | |
| 9 | #ifndef LLVM_CLANG_ATTR_CLASSES_INC |
| 10 | #define LLVM_CLANG_ATTR_CLASSES_INC |
| 11 | |
| 12 | class AArch64VectorPcsAttr : public InheritableAttr { |
| 13 | public: |
| 14 | enum Spelling { |
| 15 | GNU_aarch64_vector_pcs = 0, |
| 16 | CXX11_clang_aarch64_vector_pcs = 1, |
| 17 | C2x_clang_aarch64_vector_pcs = 2, |
| 18 | SpellingNotCalculated = 15 |
| 19 | |
| 20 | }; |
| 21 | |
| 22 | // Factory methods |
| 23 | static AArch64VectorPcsAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 24 | static AArch64VectorPcsAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 25 | static AArch64VectorPcsAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 26 | static AArch64VectorPcsAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 27 | |
| 28 | // Constructors |
| 29 | AArch64VectorPcsAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 30 | ); |
| 31 | |
| 32 | AArch64VectorPcsAttr *clone(ASTContext &C) const; |
| 33 | void printPretty(raw_ostream &OS, |
| 34 | const PrintingPolicy &Policy) const; |
| 35 | const char *getSpelling() const; |
| 36 | |
| 37 | |
| 38 | static bool classof(const Attr *A) { return A->getKind() == attr::AArch64VectorPcs; } |
| 39 | }; |
| 40 | |
| 41 | class AMDGPUFlatWorkGroupSizeAttr : public InheritableAttr { |
| 42 | Expr * min; |
| 43 | |
| 44 | Expr * max; |
| 45 | |
| 46 | public: |
| 47 | enum Spelling { |
| 48 | GNU_amdgpu_flat_work_group_size = 0, |
| 49 | CXX11_clang_amdgpu_flat_work_group_size = 1, |
| 50 | SpellingNotCalculated = 15 |
| 51 | |
| 52 | }; |
| 53 | |
| 54 | // Factory methods |
| 55 | static AMDGPUFlatWorkGroupSizeAttr *CreateImplicit(ASTContext &Ctx, Expr * Min, Expr * Max, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 56 | static AMDGPUFlatWorkGroupSizeAttr *Create(ASTContext &Ctx, Expr * Min, Expr * Max, const AttributeCommonInfo &CommonInfo); |
| 57 | static AMDGPUFlatWorkGroupSizeAttr *CreateImplicit(ASTContext &Ctx, Expr * Min, Expr * Max, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 58 | static AMDGPUFlatWorkGroupSizeAttr *Create(ASTContext &Ctx, Expr * Min, Expr * Max, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 59 | |
| 60 | // Constructors |
| 61 | AMDGPUFlatWorkGroupSizeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 62 | , Expr * Min |
| 63 | , Expr * Max |
| 64 | ); |
| 65 | |
| 66 | AMDGPUFlatWorkGroupSizeAttr *clone(ASTContext &C) const; |
| 67 | void printPretty(raw_ostream &OS, |
| 68 | const PrintingPolicy &Policy) const; |
| 69 | const char *getSpelling() const; |
| 70 | Expr * getMin() const { |
| 71 | return min; |
| 72 | } |
| 73 | |
| 74 | Expr * getMax() const { |
| 75 | return max; |
| 76 | } |
| 77 | |
| 78 | |
| 79 | |
| 80 | static bool classof(const Attr *A) { return A->getKind() == attr::AMDGPUFlatWorkGroupSize; } |
| 81 | }; |
| 82 | |
| 83 | class AMDGPUNumSGPRAttr : public InheritableAttr { |
| 84 | unsigned numSGPR; |
| 85 | |
| 86 | public: |
| 87 | enum Spelling { |
| 88 | GNU_amdgpu_num_sgpr = 0, |
| 89 | CXX11_clang_amdgpu_num_sgpr = 1, |
| 90 | SpellingNotCalculated = 15 |
| 91 | |
| 92 | }; |
| 93 | |
| 94 | // Factory methods |
| 95 | static AMDGPUNumSGPRAttr *CreateImplicit(ASTContext &Ctx, unsigned NumSGPR, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 96 | static AMDGPUNumSGPRAttr *Create(ASTContext &Ctx, unsigned NumSGPR, const AttributeCommonInfo &CommonInfo); |
| 97 | static AMDGPUNumSGPRAttr *CreateImplicit(ASTContext &Ctx, unsigned NumSGPR, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 98 | static AMDGPUNumSGPRAttr *Create(ASTContext &Ctx, unsigned NumSGPR, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 99 | |
| 100 | // Constructors |
| 101 | AMDGPUNumSGPRAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 102 | , unsigned NumSGPR |
| 103 | ); |
| 104 | |
| 105 | AMDGPUNumSGPRAttr *clone(ASTContext &C) const; |
| 106 | void printPretty(raw_ostream &OS, |
| 107 | const PrintingPolicy &Policy) const; |
| 108 | const char *getSpelling() const; |
| 109 | unsigned getNumSGPR() const { |
| 110 | return numSGPR; |
| 111 | } |
| 112 | |
| 113 | |
| 114 | |
| 115 | static bool classof(const Attr *A) { return A->getKind() == attr::AMDGPUNumSGPR; } |
| 116 | }; |
| 117 | |
| 118 | class AMDGPUNumVGPRAttr : public InheritableAttr { |
| 119 | unsigned numVGPR; |
| 120 | |
| 121 | public: |
| 122 | enum Spelling { |
| 123 | GNU_amdgpu_num_vgpr = 0, |
| 124 | CXX11_clang_amdgpu_num_vgpr = 1, |
| 125 | SpellingNotCalculated = 15 |
| 126 | |
| 127 | }; |
| 128 | |
| 129 | // Factory methods |
| 130 | static AMDGPUNumVGPRAttr *CreateImplicit(ASTContext &Ctx, unsigned NumVGPR, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 131 | static AMDGPUNumVGPRAttr *Create(ASTContext &Ctx, unsigned NumVGPR, const AttributeCommonInfo &CommonInfo); |
| 132 | static AMDGPUNumVGPRAttr *CreateImplicit(ASTContext &Ctx, unsigned NumVGPR, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 133 | static AMDGPUNumVGPRAttr *Create(ASTContext &Ctx, unsigned NumVGPR, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 134 | |
| 135 | // Constructors |
| 136 | AMDGPUNumVGPRAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 137 | , unsigned NumVGPR |
| 138 | ); |
| 139 | |
| 140 | AMDGPUNumVGPRAttr *clone(ASTContext &C) const; |
| 141 | void printPretty(raw_ostream &OS, |
| 142 | const PrintingPolicy &Policy) const; |
| 143 | const char *getSpelling() const; |
| 144 | unsigned getNumVGPR() const { |
| 145 | return numVGPR; |
| 146 | } |
| 147 | |
| 148 | |
| 149 | |
| 150 | static bool classof(const Attr *A) { return A->getKind() == attr::AMDGPUNumVGPR; } |
| 151 | }; |
| 152 | |
| 153 | class AMDGPUWavesPerEUAttr : public InheritableAttr { |
| 154 | Expr * min; |
| 155 | |
| 156 | Expr * max; |
| 157 | |
| 158 | public: |
| 159 | enum Spelling { |
| 160 | GNU_amdgpu_waves_per_eu = 0, |
| 161 | CXX11_clang_amdgpu_waves_per_eu = 1, |
| 162 | SpellingNotCalculated = 15 |
| 163 | |
| 164 | }; |
| 165 | |
| 166 | // Factory methods |
| 167 | static AMDGPUWavesPerEUAttr *CreateImplicit(ASTContext &Ctx, Expr * Min, Expr * Max, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 168 | static AMDGPUWavesPerEUAttr *Create(ASTContext &Ctx, Expr * Min, Expr * Max, const AttributeCommonInfo &CommonInfo); |
| 169 | static AMDGPUWavesPerEUAttr *CreateImplicit(ASTContext &Ctx, Expr * Min, Expr * Max, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 170 | static AMDGPUWavesPerEUAttr *Create(ASTContext &Ctx, Expr * Min, Expr * Max, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 171 | |
| 172 | // Constructors |
| 173 | AMDGPUWavesPerEUAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 174 | , Expr * Min |
| 175 | , Expr * Max |
| 176 | ); |
| 177 | AMDGPUWavesPerEUAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 178 | , Expr * Min |
| 179 | ); |
| 180 | |
| 181 | AMDGPUWavesPerEUAttr *clone(ASTContext &C) const; |
| 182 | void printPretty(raw_ostream &OS, |
| 183 | const PrintingPolicy &Policy) const; |
| 184 | const char *getSpelling() const; |
| 185 | Expr * getMin() const { |
| 186 | return min; |
| 187 | } |
| 188 | |
| 189 | Expr * getMax() const { |
| 190 | return max; |
| 191 | } |
| 192 | |
| 193 | |
| 194 | |
| 195 | static bool classof(const Attr *A) { return A->getKind() == attr::AMDGPUWavesPerEU; } |
| 196 | }; |
| 197 | |
| 198 | class ARMInterruptAttr : public InheritableAttr { |
| 199 | public: |
| 200 | enum InterruptType { |
| 201 | IRQ, |
| 202 | FIQ, |
| 203 | SWI, |
| 204 | ABORT, |
| 205 | UNDEF, |
| 206 | Generic |
| 207 | }; |
| 208 | private: |
| 209 | InterruptType interrupt; |
| 210 | |
| 211 | public: |
| 212 | enum Spelling { |
| 213 | GNU_interrupt = 0, |
| 214 | CXX11_gnu_interrupt = 1, |
| 215 | C2x_gnu_interrupt = 2, |
| 216 | SpellingNotCalculated = 15 |
| 217 | |
| 218 | }; |
| 219 | |
| 220 | // Factory methods |
| 221 | static ARMInterruptAttr *CreateImplicit(ASTContext &Ctx, InterruptType Interrupt, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 222 | static ARMInterruptAttr *Create(ASTContext &Ctx, InterruptType Interrupt, const AttributeCommonInfo &CommonInfo); |
| 223 | static ARMInterruptAttr *CreateImplicit(ASTContext &Ctx, InterruptType Interrupt, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 224 | static ARMInterruptAttr *Create(ASTContext &Ctx, InterruptType Interrupt, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 225 | |
| 226 | // Constructors |
| 227 | ARMInterruptAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 228 | , InterruptType Interrupt |
| 229 | ); |
| 230 | ARMInterruptAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 231 | ); |
| 232 | |
| 233 | ARMInterruptAttr *clone(ASTContext &C) const; |
| 234 | void printPretty(raw_ostream &OS, |
| 235 | const PrintingPolicy &Policy) const; |
| 236 | const char *getSpelling() const; |
| 237 | InterruptType getInterrupt() const { |
| 238 | return interrupt; |
| 239 | } |
| 240 | |
| 241 | static bool ConvertStrToInterruptType(StringRef Val, InterruptType &Out); |
| 242 | static const char *ConvertInterruptTypeToStr(InterruptType Val); |
| 243 | |
| 244 | |
| 245 | static bool classof(const Attr *A) { return A->getKind() == attr::ARMInterrupt; } |
| 246 | }; |
| 247 | |
| 248 | class AVRInterruptAttr : public InheritableAttr { |
| 249 | public: |
| 250 | enum Spelling { |
| 251 | GNU_interrupt = 0, |
| 252 | CXX11_gnu_interrupt = 1, |
| 253 | C2x_gnu_interrupt = 2, |
| 254 | SpellingNotCalculated = 15 |
| 255 | |
| 256 | }; |
| 257 | |
| 258 | // Factory methods |
| 259 | static AVRInterruptAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 260 | static AVRInterruptAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 261 | static AVRInterruptAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 262 | static AVRInterruptAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 263 | |
| 264 | // Constructors |
| 265 | AVRInterruptAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 266 | ); |
| 267 | |
| 268 | AVRInterruptAttr *clone(ASTContext &C) const; |
| 269 | void printPretty(raw_ostream &OS, |
| 270 | const PrintingPolicy &Policy) const; |
| 271 | const char *getSpelling() const; |
| 272 | |
| 273 | |
| 274 | static bool classof(const Attr *A) { return A->getKind() == attr::AVRInterrupt; } |
| 275 | }; |
| 276 | |
| 277 | class AVRSignalAttr : public InheritableAttr { |
| 278 | public: |
| 279 | enum Spelling { |
| 280 | GNU_signal = 0, |
| 281 | CXX11_gnu_signal = 1, |
| 282 | C2x_gnu_signal = 2, |
| 283 | SpellingNotCalculated = 15 |
| 284 | |
| 285 | }; |
| 286 | |
| 287 | // Factory methods |
| 288 | static AVRSignalAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 289 | static AVRSignalAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 290 | static AVRSignalAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 291 | static AVRSignalAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 292 | |
| 293 | // Constructors |
| 294 | AVRSignalAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 295 | ); |
| 296 | |
| 297 | AVRSignalAttr *clone(ASTContext &C) const; |
| 298 | void printPretty(raw_ostream &OS, |
| 299 | const PrintingPolicy &Policy) const; |
| 300 | const char *getSpelling() const; |
| 301 | |
| 302 | |
| 303 | static bool classof(const Attr *A) { return A->getKind() == attr::AVRSignal; } |
| 304 | }; |
| 305 | |
| 306 | class AbiTagAttr : public Attr { |
| 307 | unsigned tags_Size; |
| 308 | StringRef *tags_; |
| 309 | |
| 310 | public: |
| 311 | enum Spelling { |
| 312 | GNU_abi_tag = 0, |
| 313 | CXX11_gnu_abi_tag = 1, |
| 314 | SpellingNotCalculated = 15 |
| 315 | |
| 316 | }; |
| 317 | |
| 318 | // Factory methods |
| 319 | static AbiTagAttr *CreateImplicit(ASTContext &Ctx, StringRef *Tags, unsigned TagsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 320 | static AbiTagAttr *Create(ASTContext &Ctx, StringRef *Tags, unsigned TagsSize, const AttributeCommonInfo &CommonInfo); |
| 321 | static AbiTagAttr *CreateImplicit(ASTContext &Ctx, StringRef *Tags, unsigned TagsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 322 | static AbiTagAttr *Create(ASTContext &Ctx, StringRef *Tags, unsigned TagsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 323 | |
| 324 | // Constructors |
| 325 | AbiTagAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 326 | , StringRef *Tags, unsigned TagsSize |
| 327 | ); |
| 328 | AbiTagAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 329 | ); |
| 330 | |
| 331 | AbiTagAttr *clone(ASTContext &C) const; |
| 332 | void printPretty(raw_ostream &OS, |
| 333 | const PrintingPolicy &Policy) const; |
| 334 | const char *getSpelling() const; |
| 335 | typedef StringRef* tags_iterator; |
| 336 | tags_iterator tags_begin() const { return tags_; } |
| 337 | tags_iterator tags_end() const { return tags_ + tags_Size; } |
| 338 | unsigned tags_size() const { return tags_Size; } |
| 339 | llvm::iterator_range<tags_iterator> tags() const { return llvm::make_range(tags_begin(), tags_end()); } |
| 340 | |
| 341 | |
| 342 | |
| 343 | |
| 344 | static bool classof(const Attr *A) { return A->getKind() == attr::AbiTag; } |
| 345 | }; |
| 346 | |
| 347 | class AcquireCapabilityAttr : public InheritableAttr { |
| 348 | unsigned args_Size; |
| 349 | Expr * *args_; |
| 350 | |
| 351 | public: |
| 352 | enum Spelling { |
| 353 | GNU_acquire_capability = 0, |
| 354 | CXX11_clang_acquire_capability = 1, |
| 355 | GNU_acquire_shared_capability = 2, |
| 356 | CXX11_clang_acquire_shared_capability = 3, |
| 357 | GNU_exclusive_lock_function = 4, |
| 358 | GNU_shared_lock_function = 5, |
| 359 | SpellingNotCalculated = 15 |
| 360 | |
| 361 | }; |
| 362 | |
| 363 | // Factory methods |
| 364 | static AcquireCapabilityAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 365 | static AcquireCapabilityAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 366 | static AcquireCapabilityAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, AcquireCapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 367 | static AcquireCapabilityAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, AcquireCapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 368 | |
| 369 | // Constructors |
| 370 | AcquireCapabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 371 | , Expr * *Args, unsigned ArgsSize |
| 372 | ); |
| 373 | AcquireCapabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 374 | ); |
| 375 | |
| 376 | AcquireCapabilityAttr *clone(ASTContext &C) const; |
| 377 | void printPretty(raw_ostream &OS, |
| 378 | const PrintingPolicy &Policy) const; |
| 379 | const char *getSpelling() const; |
| 380 | Spelling getSemanticSpelling() const; |
| 381 | bool isShared() const { return getAttributeSpellingListIndex() == 2 || |
| 382 | getAttributeSpellingListIndex() == 3 || |
| 383 | getAttributeSpellingListIndex() == 5; } |
| 384 | typedef Expr ** args_iterator; |
| 385 | args_iterator args_begin() const { return args_; } |
| 386 | args_iterator args_end() const { return args_ + args_Size; } |
| 387 | unsigned args_size() const { return args_Size; } |
| 388 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 389 | |
| 390 | |
| 391 | |
| 392 | |
| 393 | static bool classof(const Attr *A) { return A->getKind() == attr::AcquireCapability; } |
| 394 | }; |
| 395 | |
| 396 | class AcquireHandleAttr : public InheritableAttr { |
| 397 | unsigned handleTypeLength; |
| 398 | char *handleType; |
| 399 | |
| 400 | public: |
| 401 | enum Spelling { |
| 402 | GNU_acquire_handle = 0, |
| 403 | CXX11_clang_acquire_handle = 1, |
| 404 | C2x_clang_acquire_handle = 2, |
| 405 | SpellingNotCalculated = 15 |
| 406 | |
| 407 | }; |
| 408 | |
| 409 | // Factory methods |
| 410 | static AcquireHandleAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef HandleType, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 411 | static AcquireHandleAttr *Create(ASTContext &Ctx, llvm::StringRef HandleType, const AttributeCommonInfo &CommonInfo); |
| 412 | static AcquireHandleAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef HandleType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 413 | static AcquireHandleAttr *Create(ASTContext &Ctx, llvm::StringRef HandleType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 414 | |
| 415 | // Constructors |
| 416 | AcquireHandleAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 417 | , llvm::StringRef HandleType |
| 418 | ); |
| 419 | |
| 420 | AcquireHandleAttr *clone(ASTContext &C) const; |
| 421 | void printPretty(raw_ostream &OS, |
| 422 | const PrintingPolicy &Policy) const; |
| 423 | const char *getSpelling() const; |
| 424 | llvm::StringRef getHandleType() const { |
| 425 | return llvm::StringRef(handleType, handleTypeLength); |
| 426 | } |
| 427 | unsigned getHandleTypeLength() const { |
| 428 | return handleTypeLength; |
| 429 | } |
| 430 | void setHandleType(ASTContext &C, llvm::StringRef S) { |
| 431 | handleTypeLength = S.size(); |
| 432 | this->handleType = new (C, 1) char [handleTypeLength]; |
| 433 | if (!S.empty()) |
| 434 | std::memcpy(this->handleType, S.data(), handleTypeLength); |
| 435 | } |
| 436 | |
| 437 | |
| 438 | |
| 439 | static bool classof(const Attr *A) { return A->getKind() == attr::AcquireHandle; } |
| 440 | }; |
| 441 | |
| 442 | class AcquiredAfterAttr : public InheritableAttr { |
| 443 | unsigned args_Size; |
| 444 | Expr * *args_; |
| 445 | |
| 446 | public: |
| 447 | // Factory methods |
| 448 | static AcquiredAfterAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 449 | static AcquiredAfterAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 450 | static AcquiredAfterAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 451 | static AcquiredAfterAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 452 | |
| 453 | // Constructors |
| 454 | AcquiredAfterAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 455 | , Expr * *Args, unsigned ArgsSize |
| 456 | ); |
| 457 | AcquiredAfterAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 458 | ); |
| 459 | |
| 460 | AcquiredAfterAttr *clone(ASTContext &C) const; |
| 461 | void printPretty(raw_ostream &OS, |
| 462 | const PrintingPolicy &Policy) const; |
| 463 | const char *getSpelling() const; |
| 464 | typedef Expr ** args_iterator; |
| 465 | args_iterator args_begin() const { return args_; } |
| 466 | args_iterator args_end() const { return args_ + args_Size; } |
| 467 | unsigned args_size() const { return args_Size; } |
| 468 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 469 | |
| 470 | |
| 471 | |
| 472 | |
| 473 | static bool classof(const Attr *A) { return A->getKind() == attr::AcquiredAfter; } |
| 474 | }; |
| 475 | |
| 476 | class AcquiredBeforeAttr : public InheritableAttr { |
| 477 | unsigned args_Size; |
| 478 | Expr * *args_; |
| 479 | |
| 480 | public: |
| 481 | // Factory methods |
| 482 | static AcquiredBeforeAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 483 | static AcquiredBeforeAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 484 | static AcquiredBeforeAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 485 | static AcquiredBeforeAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 486 | |
| 487 | // Constructors |
| 488 | AcquiredBeforeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 489 | , Expr * *Args, unsigned ArgsSize |
| 490 | ); |
| 491 | AcquiredBeforeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 492 | ); |
| 493 | |
| 494 | AcquiredBeforeAttr *clone(ASTContext &C) const; |
| 495 | void printPretty(raw_ostream &OS, |
| 496 | const PrintingPolicy &Policy) const; |
| 497 | const char *getSpelling() const; |
| 498 | typedef Expr ** args_iterator; |
| 499 | args_iterator args_begin() const { return args_; } |
| 500 | args_iterator args_end() const { return args_ + args_Size; } |
| 501 | unsigned args_size() const { return args_Size; } |
| 502 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 503 | |
| 504 | |
| 505 | |
| 506 | |
| 507 | static bool classof(const Attr *A) { return A->getKind() == attr::AcquiredBefore; } |
| 508 | }; |
| 509 | |
| 510 | class AddressSpaceAttr : public TypeAttr { |
| 511 | int addressSpace; |
| 512 | |
| 513 | public: |
| 514 | enum Spelling { |
| 515 | GNU_address_space = 0, |
| 516 | CXX11_clang_address_space = 1, |
| 517 | C2x_clang_address_space = 2, |
| 518 | SpellingNotCalculated = 15 |
| 519 | |
| 520 | }; |
| 521 | |
| 522 | // Factory methods |
| 523 | static AddressSpaceAttr *CreateImplicit(ASTContext &Ctx, int AddressSpace, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 524 | static AddressSpaceAttr *Create(ASTContext &Ctx, int AddressSpace, const AttributeCommonInfo &CommonInfo); |
| 525 | static AddressSpaceAttr *CreateImplicit(ASTContext &Ctx, int AddressSpace, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 526 | static AddressSpaceAttr *Create(ASTContext &Ctx, int AddressSpace, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 527 | |
| 528 | // Constructors |
| 529 | AddressSpaceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 530 | , int AddressSpace |
| 531 | ); |
| 532 | |
| 533 | AddressSpaceAttr *clone(ASTContext &C) const; |
| 534 | void printPretty(raw_ostream &OS, |
| 535 | const PrintingPolicy &Policy) const; |
| 536 | const char *getSpelling() const; |
| 537 | int getAddressSpace() const { |
| 538 | return addressSpace; |
| 539 | } |
| 540 | |
| 541 | |
| 542 | |
| 543 | static bool classof(const Attr *A) { return A->getKind() == attr::AddressSpace; } |
| 544 | }; |
| 545 | |
| 546 | class AliasAttr : public Attr { |
| 547 | unsigned aliaseeLength; |
| 548 | char *aliasee; |
| 549 | |
| 550 | public: |
| 551 | enum Spelling { |
| 552 | GNU_alias = 0, |
| 553 | CXX11_gnu_alias = 1, |
| 554 | C2x_gnu_alias = 2, |
| 555 | SpellingNotCalculated = 15 |
| 556 | |
| 557 | }; |
| 558 | |
| 559 | // Factory methods |
| 560 | static AliasAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Aliasee, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 561 | static AliasAttr *Create(ASTContext &Ctx, llvm::StringRef Aliasee, const AttributeCommonInfo &CommonInfo); |
| 562 | static AliasAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Aliasee, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 563 | static AliasAttr *Create(ASTContext &Ctx, llvm::StringRef Aliasee, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 564 | |
| 565 | // Constructors |
| 566 | AliasAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 567 | , llvm::StringRef Aliasee |
| 568 | ); |
| 569 | |
| 570 | AliasAttr *clone(ASTContext &C) const; |
| 571 | void printPretty(raw_ostream &OS, |
| 572 | const PrintingPolicy &Policy) const; |
| 573 | const char *getSpelling() const; |
| 574 | llvm::StringRef getAliasee() const { |
| 575 | return llvm::StringRef(aliasee, aliaseeLength); |
| 576 | } |
| 577 | unsigned getAliaseeLength() const { |
| 578 | return aliaseeLength; |
| 579 | } |
| 580 | void setAliasee(ASTContext &C, llvm::StringRef S) { |
| 581 | aliaseeLength = S.size(); |
| 582 | this->aliasee = new (C, 1) char [aliaseeLength]; |
| 583 | if (!S.empty()) |
| 584 | std::memcpy(this->aliasee, S.data(), aliaseeLength); |
| 585 | } |
| 586 | |
| 587 | |
| 588 | |
| 589 | static bool classof(const Attr *A) { return A->getKind() == attr::Alias; } |
| 590 | }; |
| 591 | |
| 592 | class AlignMac68kAttr : public InheritableAttr { |
| 593 | public: |
| 594 | // Factory methods |
| 595 | static AlignMac68kAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 596 | static AlignMac68kAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 597 | static AlignMac68kAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 598 | static AlignMac68kAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 599 | |
| 600 | // Constructors |
| 601 | AlignMac68kAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 602 | ); |
| 603 | |
| 604 | AlignMac68kAttr *clone(ASTContext &C) const; |
| 605 | void printPretty(raw_ostream &OS, |
| 606 | const PrintingPolicy &Policy) const; |
| 607 | const char *getSpelling() const; |
| 608 | |
| 609 | |
| 610 | static bool classof(const Attr *A) { return A->getKind() == attr::AlignMac68k; } |
| 611 | }; |
| 612 | |
| 613 | class AlignNaturalAttr : public InheritableAttr { |
| 614 | public: |
| 615 | // Factory methods |
| 616 | static AlignNaturalAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 617 | static AlignNaturalAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 618 | static AlignNaturalAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 619 | static AlignNaturalAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 620 | |
| 621 | // Constructors |
| 622 | AlignNaturalAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 623 | ); |
| 624 | |
| 625 | AlignNaturalAttr *clone(ASTContext &C) const; |
| 626 | void printPretty(raw_ostream &OS, |
| 627 | const PrintingPolicy &Policy) const; |
| 628 | const char *getSpelling() const; |
| 629 | |
| 630 | |
| 631 | static bool classof(const Attr *A) { return A->getKind() == attr::AlignNatural; } |
| 632 | }; |
| 633 | |
| 634 | class AlignValueAttr : public Attr { |
| 635 | Expr * alignment; |
| 636 | |
| 637 | public: |
| 638 | // Factory methods |
| 639 | static AlignValueAttr *CreateImplicit(ASTContext &Ctx, Expr * Alignment, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 640 | static AlignValueAttr *Create(ASTContext &Ctx, Expr * Alignment, const AttributeCommonInfo &CommonInfo); |
| 641 | static AlignValueAttr *CreateImplicit(ASTContext &Ctx, Expr * Alignment, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 642 | static AlignValueAttr *Create(ASTContext &Ctx, Expr * Alignment, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 643 | |
| 644 | // Constructors |
| 645 | AlignValueAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 646 | , Expr * Alignment |
| 647 | ); |
| 648 | |
| 649 | AlignValueAttr *clone(ASTContext &C) const; |
| 650 | void printPretty(raw_ostream &OS, |
| 651 | const PrintingPolicy &Policy) const; |
| 652 | const char *getSpelling() const; |
| 653 | Expr * getAlignment() const { |
| 654 | return alignment; |
| 655 | } |
| 656 | |
| 657 | |
| 658 | |
| 659 | static bool classof(const Attr *A) { return A->getKind() == attr::AlignValue; } |
| 660 | }; |
| 661 | |
| 662 | class AlignedAttr : public InheritableAttr { |
| 663 | bool isalignmentExpr; |
| 664 | union { |
| 665 | Expr *alignmentExpr; |
| 666 | TypeSourceInfo *alignmentType; |
| 667 | }; |
| 668 | |
| 669 | public: |
| 670 | enum Spelling { |
| 671 | GNU_aligned = 0, |
| 672 | CXX11_gnu_aligned = 1, |
| 673 | C2x_gnu_aligned = 2, |
| 674 | Declspec_align = 3, |
| 675 | Keyword_alignas = 4, |
| 676 | Keyword_Alignas = 5, |
| 677 | SpellingNotCalculated = 15 |
| 678 | |
| 679 | }; |
| 680 | |
| 681 | // Factory methods |
| 682 | static AlignedAttr *CreateImplicit(ASTContext &Ctx, bool IsAlignmentExpr, void *Alignment, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 683 | static AlignedAttr *Create(ASTContext &Ctx, bool IsAlignmentExpr, void *Alignment, const AttributeCommonInfo &CommonInfo); |
| 684 | static AlignedAttr *CreateImplicit(ASTContext &Ctx, bool IsAlignmentExpr, void *Alignment, SourceRange Range, AttributeCommonInfo::Syntax Syntax, AlignedAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 685 | static AlignedAttr *Create(ASTContext &Ctx, bool IsAlignmentExpr, void *Alignment, SourceRange Range, AttributeCommonInfo::Syntax Syntax, AlignedAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 686 | |
| 687 | // Constructors |
| 688 | AlignedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 689 | , bool IsAlignmentExpr, void *Alignment |
| 690 | ); |
| 691 | AlignedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 692 | ); |
| 693 | |
| 694 | AlignedAttr *clone(ASTContext &C) const; |
| 695 | void printPretty(raw_ostream &OS, |
| 696 | const PrintingPolicy &Policy) const; |
| 697 | const char *getSpelling() const; |
| 698 | Spelling getSemanticSpelling() const; |
| 699 | bool isGNU() const { return getAttributeSpellingListIndex() == 0 || |
| 700 | getAttributeSpellingListIndex() == 1 || |
| 701 | getAttributeSpellingListIndex() == 2; } |
| 702 | bool isC11() const { return getAttributeSpellingListIndex() == 5; } |
| 703 | bool isAlignas() const { return getAttributeSpellingListIndex() == 4 || |
| 704 | getAttributeSpellingListIndex() == 5; } |
| 705 | bool isDeclspec() const { return getAttributeSpellingListIndex() == 3; } |
| 706 | bool isAlignmentDependent() const; |
| 707 | bool isAlignmentErrorDependent() const; |
| 708 | unsigned getAlignment(ASTContext &Ctx) const; |
| 709 | bool isAlignmentExpr() const { |
| 710 | return isalignmentExpr; |
| 711 | } |
| 712 | Expr *getAlignmentExpr() const { |
| 713 | assert(isalignmentExpr); |
| 714 | return alignmentExpr; |
| 715 | } |
| 716 | TypeSourceInfo *getAlignmentType() const { |
| 717 | assert(!isalignmentExpr); |
| 718 | return alignmentType; |
| 719 | } |
| 720 | |
| 721 | |
| 722 | |
| 723 | static bool classof(const Attr *A) { return A->getKind() == attr::Aligned; } |
| 724 | }; |
| 725 | |
| 726 | class AllocAlignAttr : public InheritableAttr { |
| 727 | ParamIdx paramIndex; |
| 728 | |
| 729 | public: |
| 730 | enum Spelling { |
| 731 | GNU_alloc_align = 0, |
| 732 | CXX11_gnu_alloc_align = 1, |
| 733 | C2x_gnu_alloc_align = 2, |
| 734 | SpellingNotCalculated = 15 |
| 735 | |
| 736 | }; |
| 737 | |
| 738 | // Factory methods |
| 739 | static AllocAlignAttr *CreateImplicit(ASTContext &Ctx, ParamIdx ParamIndex, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 740 | static AllocAlignAttr *Create(ASTContext &Ctx, ParamIdx ParamIndex, const AttributeCommonInfo &CommonInfo); |
| 741 | static AllocAlignAttr *CreateImplicit(ASTContext &Ctx, ParamIdx ParamIndex, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 742 | static AllocAlignAttr *Create(ASTContext &Ctx, ParamIdx ParamIndex, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 743 | |
| 744 | // Constructors |
| 745 | AllocAlignAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 746 | , ParamIdx ParamIndex |
| 747 | ); |
| 748 | |
| 749 | AllocAlignAttr *clone(ASTContext &C) const; |
| 750 | void printPretty(raw_ostream &OS, |
| 751 | const PrintingPolicy &Policy) const; |
| 752 | const char *getSpelling() const; |
| 753 | ParamIdx getParamIndex() const { |
| 754 | return paramIndex; |
| 755 | } |
| 756 | |
| 757 | |
| 758 | |
| 759 | static bool classof(const Attr *A) { return A->getKind() == attr::AllocAlign; } |
| 760 | }; |
| 761 | |
| 762 | class AllocSizeAttr : public InheritableAttr { |
| 763 | ParamIdx elemSizeParam; |
| 764 | |
| 765 | ParamIdx numElemsParam; |
| 766 | |
| 767 | public: |
| 768 | enum Spelling { |
| 769 | GNU_alloc_size = 0, |
| 770 | CXX11_gnu_alloc_size = 1, |
| 771 | C2x_gnu_alloc_size = 2, |
| 772 | SpellingNotCalculated = 15 |
| 773 | |
| 774 | }; |
| 775 | |
| 776 | // Factory methods |
| 777 | static AllocSizeAttr *CreateImplicit(ASTContext &Ctx, ParamIdx ElemSizeParam, ParamIdx NumElemsParam, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 778 | static AllocSizeAttr *Create(ASTContext &Ctx, ParamIdx ElemSizeParam, ParamIdx NumElemsParam, const AttributeCommonInfo &CommonInfo); |
| 779 | static AllocSizeAttr *CreateImplicit(ASTContext &Ctx, ParamIdx ElemSizeParam, ParamIdx NumElemsParam, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 780 | static AllocSizeAttr *Create(ASTContext &Ctx, ParamIdx ElemSizeParam, ParamIdx NumElemsParam, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 781 | |
| 782 | // Constructors |
| 783 | AllocSizeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 784 | , ParamIdx ElemSizeParam |
| 785 | , ParamIdx NumElemsParam |
| 786 | ); |
| 787 | AllocSizeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 788 | , ParamIdx ElemSizeParam |
| 789 | ); |
| 790 | |
| 791 | AllocSizeAttr *clone(ASTContext &C) const; |
| 792 | void printPretty(raw_ostream &OS, |
| 793 | const PrintingPolicy &Policy) const; |
| 794 | const char *getSpelling() const; |
| 795 | ParamIdx getElemSizeParam() const { |
| 796 | return elemSizeParam; |
| 797 | } |
| 798 | |
| 799 | ParamIdx getNumElemsParam() const { |
| 800 | return numElemsParam; |
| 801 | } |
| 802 | |
| 803 | |
| 804 | |
| 805 | static bool classof(const Attr *A) { return A->getKind() == attr::AllocSize; } |
| 806 | }; |
| 807 | |
| 808 | class AlwaysDestroyAttr : public InheritableAttr { |
| 809 | public: |
| 810 | enum Spelling { |
| 811 | GNU_always_destroy = 0, |
| 812 | CXX11_clang_always_destroy = 1, |
| 813 | SpellingNotCalculated = 15 |
| 814 | |
| 815 | }; |
| 816 | |
| 817 | // Factory methods |
| 818 | static AlwaysDestroyAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 819 | static AlwaysDestroyAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 820 | static AlwaysDestroyAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 821 | static AlwaysDestroyAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 822 | |
| 823 | // Constructors |
| 824 | AlwaysDestroyAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 825 | ); |
| 826 | |
| 827 | AlwaysDestroyAttr *clone(ASTContext &C) const; |
| 828 | void printPretty(raw_ostream &OS, |
| 829 | const PrintingPolicy &Policy) const; |
| 830 | const char *getSpelling() const; |
| 831 | |
| 832 | |
| 833 | static bool classof(const Attr *A) { return A->getKind() == attr::AlwaysDestroy; } |
| 834 | }; |
| 835 | |
| 836 | class AlwaysInlineAttr : public InheritableAttr { |
| 837 | public: |
| 838 | enum Spelling { |
| 839 | GNU_always_inline = 0, |
| 840 | CXX11_gnu_always_inline = 1, |
| 841 | C2x_gnu_always_inline = 2, |
| 842 | Keyword_forceinline = 3, |
| 843 | SpellingNotCalculated = 15 |
| 844 | |
| 845 | }; |
| 846 | |
| 847 | // Factory methods |
| 848 | static AlwaysInlineAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 849 | static AlwaysInlineAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 850 | static AlwaysInlineAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, AlwaysInlineAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 851 | static AlwaysInlineAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, AlwaysInlineAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 852 | |
| 853 | // Constructors |
| 854 | AlwaysInlineAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 855 | ); |
| 856 | |
| 857 | AlwaysInlineAttr *clone(ASTContext &C) const; |
| 858 | void printPretty(raw_ostream &OS, |
| 859 | const PrintingPolicy &Policy) const; |
| 860 | const char *getSpelling() const; |
| 861 | Spelling getSemanticSpelling() const; |
| 862 | |
| 863 | |
| 864 | static bool classof(const Attr *A) { return A->getKind() == attr::AlwaysInline; } |
| 865 | }; |
| 866 | |
| 867 | class AnalyzerNoReturnAttr : public InheritableAttr { |
| 868 | public: |
| 869 | // Factory methods |
| 870 | static AnalyzerNoReturnAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 871 | static AnalyzerNoReturnAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 872 | static AnalyzerNoReturnAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 873 | static AnalyzerNoReturnAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 874 | |
| 875 | // Constructors |
| 876 | AnalyzerNoReturnAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 877 | ); |
| 878 | |
| 879 | AnalyzerNoReturnAttr *clone(ASTContext &C) const; |
| 880 | void printPretty(raw_ostream &OS, |
| 881 | const PrintingPolicy &Policy) const; |
| 882 | const char *getSpelling() const; |
| 883 | |
| 884 | |
| 885 | static bool classof(const Attr *A) { return A->getKind() == attr::AnalyzerNoReturn; } |
| 886 | }; |
| 887 | |
| 888 | class AnnotateAttr : public InheritableParamAttr { |
| 889 | unsigned annotationLength; |
| 890 | char *annotation; |
| 891 | |
| 892 | unsigned args_Size; |
| 893 | Expr * *args_; |
| 894 | |
| 895 | public: |
| 896 | enum Spelling { |
| 897 | GNU_annotate = 0, |
| 898 | CXX11_clang_annotate = 1, |
| 899 | C2x_clang_annotate = 2, |
| 900 | SpellingNotCalculated = 15 |
| 901 | |
| 902 | }; |
| 903 | |
| 904 | // Factory methods |
| 905 | static AnnotateAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Annotation, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 906 | static AnnotateAttr *Create(ASTContext &Ctx, llvm::StringRef Annotation, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 907 | static AnnotateAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Annotation, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 908 | static AnnotateAttr *Create(ASTContext &Ctx, llvm::StringRef Annotation, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 909 | |
| 910 | // Constructors |
| 911 | AnnotateAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 912 | , llvm::StringRef Annotation |
| 913 | , Expr * *Args, unsigned ArgsSize |
| 914 | ); |
| 915 | AnnotateAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 916 | , llvm::StringRef Annotation |
| 917 | ); |
| 918 | |
| 919 | AnnotateAttr *clone(ASTContext &C) const; |
| 920 | void printPretty(raw_ostream &OS, |
| 921 | const PrintingPolicy &Policy) const; |
| 922 | const char *getSpelling() const; |
| 923 | llvm::StringRef getAnnotation() const { |
| 924 | return llvm::StringRef(annotation, annotationLength); |
| 925 | } |
| 926 | unsigned getAnnotationLength() const { |
| 927 | return annotationLength; |
| 928 | } |
| 929 | void setAnnotation(ASTContext &C, llvm::StringRef S) { |
| 930 | annotationLength = S.size(); |
| 931 | this->annotation = new (C, 1) char [annotationLength]; |
| 932 | if (!S.empty()) |
| 933 | std::memcpy(this->annotation, S.data(), annotationLength); |
| 934 | } |
| 935 | |
| 936 | typedef Expr ** args_iterator; |
| 937 | args_iterator args_begin() const { return args_; } |
| 938 | args_iterator args_end() const { return args_ + args_Size; } |
| 939 | unsigned args_size() const { return args_Size; } |
| 940 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 941 | |
| 942 | |
| 943 | |
| 944 | static AnnotateAttr *Create(ASTContext &Ctx, llvm::StringRef Annotation, \ |
| 945 | const AttributeCommonInfo &CommonInfo) { |
| 946 | return AnnotateAttr::Create(Ctx, Annotation, nullptr, 0, CommonInfo); |
| 947 | } |
| 948 | static AnnotateAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Annotation, \ |
| 949 | const AttributeCommonInfo &CommonInfo = {SourceRange{}}) { |
| 950 | return AnnotateAttr::CreateImplicit(Ctx, Annotation, nullptr, 0, CommonInfo); |
| 951 | } |
| 952 | |
| 953 | |
| 954 | static bool classof(const Attr *A) { return A->getKind() == attr::Annotate; } |
| 955 | }; |
| 956 | |
| 957 | class AnyX86InterruptAttr : public InheritableAttr { |
| 958 | public: |
| 959 | enum Spelling { |
| 960 | GNU_interrupt = 0, |
| 961 | CXX11_gnu_interrupt = 1, |
| 962 | C2x_gnu_interrupt = 2, |
| 963 | SpellingNotCalculated = 15 |
| 964 | |
| 965 | }; |
| 966 | |
| 967 | // Factory methods |
| 968 | static AnyX86InterruptAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 969 | static AnyX86InterruptAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 970 | static AnyX86InterruptAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 971 | static AnyX86InterruptAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 972 | |
| 973 | // Constructors |
| 974 | AnyX86InterruptAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 975 | ); |
| 976 | |
| 977 | AnyX86InterruptAttr *clone(ASTContext &C) const; |
| 978 | void printPretty(raw_ostream &OS, |
| 979 | const PrintingPolicy &Policy) const; |
| 980 | const char *getSpelling() const; |
| 981 | |
| 982 | |
| 983 | static bool classof(const Attr *A) { return A->getKind() == attr::AnyX86Interrupt; } |
| 984 | }; |
| 985 | |
| 986 | class AnyX86NoCallerSavedRegistersAttr : public InheritableAttr { |
| 987 | public: |
| 988 | enum Spelling { |
| 989 | GNU_no_caller_saved_registers = 0, |
| 990 | CXX11_gnu_no_caller_saved_registers = 1, |
| 991 | C2x_gnu_no_caller_saved_registers = 2, |
| 992 | SpellingNotCalculated = 15 |
| 993 | |
| 994 | }; |
| 995 | |
| 996 | // Factory methods |
| 997 | static AnyX86NoCallerSavedRegistersAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 998 | static AnyX86NoCallerSavedRegistersAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 999 | static AnyX86NoCallerSavedRegistersAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1000 | static AnyX86NoCallerSavedRegistersAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1001 | |
| 1002 | // Constructors |
| 1003 | AnyX86NoCallerSavedRegistersAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1004 | ); |
| 1005 | |
| 1006 | AnyX86NoCallerSavedRegistersAttr *clone(ASTContext &C) const; |
| 1007 | void printPretty(raw_ostream &OS, |
| 1008 | const PrintingPolicy &Policy) const; |
| 1009 | const char *getSpelling() const; |
| 1010 | |
| 1011 | |
| 1012 | static bool classof(const Attr *A) { return A->getKind() == attr::AnyX86NoCallerSavedRegisters; } |
| 1013 | }; |
| 1014 | |
| 1015 | class AnyX86NoCfCheckAttr : public InheritableAttr { |
| 1016 | public: |
| 1017 | enum Spelling { |
| 1018 | GNU_nocf_check = 0, |
| 1019 | CXX11_gnu_nocf_check = 1, |
| 1020 | C2x_gnu_nocf_check = 2, |
| 1021 | SpellingNotCalculated = 15 |
| 1022 | |
| 1023 | }; |
| 1024 | |
| 1025 | // Factory methods |
| 1026 | static AnyX86NoCfCheckAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1027 | static AnyX86NoCfCheckAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1028 | static AnyX86NoCfCheckAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1029 | static AnyX86NoCfCheckAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1030 | |
| 1031 | // Constructors |
| 1032 | AnyX86NoCfCheckAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1033 | ); |
| 1034 | |
| 1035 | AnyX86NoCfCheckAttr *clone(ASTContext &C) const; |
| 1036 | void printPretty(raw_ostream &OS, |
| 1037 | const PrintingPolicy &Policy) const; |
| 1038 | const char *getSpelling() const; |
| 1039 | |
| 1040 | |
| 1041 | static bool classof(const Attr *A) { return A->getKind() == attr::AnyX86NoCfCheck; } |
| 1042 | }; |
| 1043 | |
| 1044 | class ArcWeakrefUnavailableAttr : public InheritableAttr { |
| 1045 | public: |
| 1046 | enum Spelling { |
| 1047 | GNU_objc_arc_weak_reference_unavailable = 0, |
| 1048 | CXX11_clang_objc_arc_weak_reference_unavailable = 1, |
| 1049 | C2x_clang_objc_arc_weak_reference_unavailable = 2, |
| 1050 | SpellingNotCalculated = 15 |
| 1051 | |
| 1052 | }; |
| 1053 | |
| 1054 | // Factory methods |
| 1055 | static ArcWeakrefUnavailableAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1056 | static ArcWeakrefUnavailableAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1057 | static ArcWeakrefUnavailableAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1058 | static ArcWeakrefUnavailableAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1059 | |
| 1060 | // Constructors |
| 1061 | ArcWeakrefUnavailableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1062 | ); |
| 1063 | |
| 1064 | ArcWeakrefUnavailableAttr *clone(ASTContext &C) const; |
| 1065 | void printPretty(raw_ostream &OS, |
| 1066 | const PrintingPolicy &Policy) const; |
| 1067 | const char *getSpelling() const; |
| 1068 | |
| 1069 | |
| 1070 | static bool classof(const Attr *A) { return A->getKind() == attr::ArcWeakrefUnavailable; } |
| 1071 | }; |
| 1072 | |
| 1073 | class ArgumentWithTypeTagAttr : public InheritableAttr { |
| 1074 | IdentifierInfo * argumentKind; |
| 1075 | |
| 1076 | ParamIdx argumentIdx; |
| 1077 | |
| 1078 | ParamIdx typeTagIdx; |
| 1079 | |
| 1080 | bool isPointer; |
| 1081 | |
| 1082 | public: |
| 1083 | enum Spelling { |
| 1084 | GNU_argument_with_type_tag = 0, |
| 1085 | CXX11_clang_argument_with_type_tag = 1, |
| 1086 | C2x_clang_argument_with_type_tag = 2, |
| 1087 | GNU_pointer_with_type_tag = 3, |
| 1088 | CXX11_clang_pointer_with_type_tag = 4, |
| 1089 | C2x_clang_pointer_with_type_tag = 5, |
| 1090 | SpellingNotCalculated = 15 |
| 1091 | |
| 1092 | }; |
| 1093 | |
| 1094 | // Factory methods |
| 1095 | static ArgumentWithTypeTagAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * ArgumentKind, ParamIdx ArgumentIdx, ParamIdx TypeTagIdx, bool IsPointer, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1096 | static ArgumentWithTypeTagAttr *Create(ASTContext &Ctx, IdentifierInfo * ArgumentKind, ParamIdx ArgumentIdx, ParamIdx TypeTagIdx, bool IsPointer, const AttributeCommonInfo &CommonInfo); |
| 1097 | static ArgumentWithTypeTagAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * ArgumentKind, ParamIdx ArgumentIdx, ParamIdx TypeTagIdx, bool IsPointer, SourceRange Range, AttributeCommonInfo::Syntax Syntax, ArgumentWithTypeTagAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 1098 | static ArgumentWithTypeTagAttr *Create(ASTContext &Ctx, IdentifierInfo * ArgumentKind, ParamIdx ArgumentIdx, ParamIdx TypeTagIdx, bool IsPointer, SourceRange Range, AttributeCommonInfo::Syntax Syntax, ArgumentWithTypeTagAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 1099 | static ArgumentWithTypeTagAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * ArgumentKind, ParamIdx ArgumentIdx, ParamIdx TypeTagIdx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1100 | static ArgumentWithTypeTagAttr *Create(ASTContext &Ctx, IdentifierInfo * ArgumentKind, ParamIdx ArgumentIdx, ParamIdx TypeTagIdx, const AttributeCommonInfo &CommonInfo); |
| 1101 | static ArgumentWithTypeTagAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * ArgumentKind, ParamIdx ArgumentIdx, ParamIdx TypeTagIdx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, ArgumentWithTypeTagAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 1102 | static ArgumentWithTypeTagAttr *Create(ASTContext &Ctx, IdentifierInfo * ArgumentKind, ParamIdx ArgumentIdx, ParamIdx TypeTagIdx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, ArgumentWithTypeTagAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 1103 | |
| 1104 | // Constructors |
| 1105 | ArgumentWithTypeTagAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1106 | , IdentifierInfo * ArgumentKind |
| 1107 | , ParamIdx ArgumentIdx |
| 1108 | , ParamIdx TypeTagIdx |
| 1109 | , bool IsPointer |
| 1110 | ); |
| 1111 | ArgumentWithTypeTagAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1112 | , IdentifierInfo * ArgumentKind |
| 1113 | , ParamIdx ArgumentIdx |
| 1114 | , ParamIdx TypeTagIdx |
| 1115 | ); |
| 1116 | |
| 1117 | ArgumentWithTypeTagAttr *clone(ASTContext &C) const; |
| 1118 | void printPretty(raw_ostream &OS, |
| 1119 | const PrintingPolicy &Policy) const; |
| 1120 | const char *getSpelling() const; |
| 1121 | Spelling getSemanticSpelling() const; |
| 1122 | IdentifierInfo * getArgumentKind() const { |
| 1123 | return argumentKind; |
| 1124 | } |
| 1125 | |
| 1126 | ParamIdx getArgumentIdx() const { |
| 1127 | return argumentIdx; |
| 1128 | } |
| 1129 | |
| 1130 | ParamIdx getTypeTagIdx() const { |
| 1131 | return typeTagIdx; |
| 1132 | } |
| 1133 | |
| 1134 | bool getIsPointer() const { |
| 1135 | return isPointer; |
| 1136 | } |
| 1137 | |
| 1138 | |
| 1139 | |
| 1140 | static bool classof(const Attr *A) { return A->getKind() == attr::ArgumentWithTypeTag; } |
| 1141 | }; |
| 1142 | |
| 1143 | class ArmBuiltinAliasAttr : public InheritableAttr { |
| 1144 | IdentifierInfo * builtinName; |
| 1145 | |
| 1146 | public: |
| 1147 | enum Spelling { |
| 1148 | GNU_clang_arm_builtin_alias = 0, |
| 1149 | CXX11_clang_clang_arm_builtin_alias = 1, |
| 1150 | C2x_clang_clang_arm_builtin_alias = 2, |
| 1151 | SpellingNotCalculated = 15 |
| 1152 | |
| 1153 | }; |
| 1154 | |
| 1155 | // Factory methods |
| 1156 | static ArmBuiltinAliasAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * BuiltinName, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1157 | static ArmBuiltinAliasAttr *Create(ASTContext &Ctx, IdentifierInfo * BuiltinName, const AttributeCommonInfo &CommonInfo); |
| 1158 | static ArmBuiltinAliasAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * BuiltinName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1159 | static ArmBuiltinAliasAttr *Create(ASTContext &Ctx, IdentifierInfo * BuiltinName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1160 | |
| 1161 | // Constructors |
| 1162 | ArmBuiltinAliasAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1163 | , IdentifierInfo * BuiltinName |
| 1164 | ); |
| 1165 | |
| 1166 | ArmBuiltinAliasAttr *clone(ASTContext &C) const; |
| 1167 | void printPretty(raw_ostream &OS, |
| 1168 | const PrintingPolicy &Policy) const; |
| 1169 | const char *getSpelling() const; |
| 1170 | IdentifierInfo * getBuiltinName() const { |
| 1171 | return builtinName; |
| 1172 | } |
| 1173 | |
| 1174 | |
| 1175 | |
| 1176 | static bool classof(const Attr *A) { return A->getKind() == attr::ArmBuiltinAlias; } |
| 1177 | }; |
| 1178 | |
| 1179 | class ArmMveStrictPolymorphismAttr : public TypeAttr { |
| 1180 | public: |
| 1181 | enum Spelling { |
| 1182 | GNU_clang_arm_mve_strict_polymorphism = 0, |
| 1183 | CXX11_clang_clang_arm_mve_strict_polymorphism = 1, |
| 1184 | C2x_clang_clang_arm_mve_strict_polymorphism = 2, |
| 1185 | SpellingNotCalculated = 15 |
| 1186 | |
| 1187 | }; |
| 1188 | |
| 1189 | // Factory methods |
| 1190 | static ArmMveStrictPolymorphismAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1191 | static ArmMveStrictPolymorphismAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1192 | static ArmMveStrictPolymorphismAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1193 | static ArmMveStrictPolymorphismAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1194 | |
| 1195 | // Constructors |
| 1196 | ArmMveStrictPolymorphismAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1197 | ); |
| 1198 | |
| 1199 | ArmMveStrictPolymorphismAttr *clone(ASTContext &C) const; |
| 1200 | void printPretty(raw_ostream &OS, |
| 1201 | const PrintingPolicy &Policy) const; |
| 1202 | const char *getSpelling() const; |
| 1203 | |
| 1204 | |
| 1205 | static bool classof(const Attr *A) { return A->getKind() == attr::ArmMveStrictPolymorphism; } |
| 1206 | }; |
| 1207 | |
| 1208 | class ArtificialAttr : public InheritableAttr { |
| 1209 | public: |
| 1210 | enum Spelling { |
| 1211 | GNU_artificial = 0, |
| 1212 | CXX11_gnu_artificial = 1, |
| 1213 | C2x_gnu_artificial = 2, |
| 1214 | SpellingNotCalculated = 15 |
| 1215 | |
| 1216 | }; |
| 1217 | |
| 1218 | // Factory methods |
| 1219 | static ArtificialAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1220 | static ArtificialAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1221 | static ArtificialAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1222 | static ArtificialAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1223 | |
| 1224 | // Constructors |
| 1225 | ArtificialAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1226 | ); |
| 1227 | |
| 1228 | ArtificialAttr *clone(ASTContext &C) const; |
| 1229 | void printPretty(raw_ostream &OS, |
| 1230 | const PrintingPolicy &Policy) const; |
| 1231 | const char *getSpelling() const; |
| 1232 | |
| 1233 | |
| 1234 | static bool classof(const Attr *A) { return A->getKind() == attr::Artificial; } |
| 1235 | }; |
| 1236 | |
| 1237 | class AsmLabelAttr : public InheritableAttr { |
| 1238 | unsigned labelLength; |
| 1239 | char *label; |
| 1240 | |
| 1241 | bool isLiteralLabel; |
| 1242 | |
| 1243 | public: |
| 1244 | enum Spelling { |
| 1245 | Keyword_asm = 0, |
| 1246 | SpellingNotCalculated = 15 |
| 1247 | |
| 1248 | }; |
| 1249 | |
| 1250 | // Factory methods |
| 1251 | static AsmLabelAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Label, bool IsLiteralLabel, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1252 | static AsmLabelAttr *Create(ASTContext &Ctx, llvm::StringRef Label, bool IsLiteralLabel, const AttributeCommonInfo &CommonInfo); |
| 1253 | static AsmLabelAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Label, bool IsLiteralLabel, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1254 | static AsmLabelAttr *Create(ASTContext &Ctx, llvm::StringRef Label, bool IsLiteralLabel, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1255 | static AsmLabelAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Label, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1256 | static AsmLabelAttr *Create(ASTContext &Ctx, llvm::StringRef Label, const AttributeCommonInfo &CommonInfo); |
| 1257 | static AsmLabelAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Label, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1258 | static AsmLabelAttr *Create(ASTContext &Ctx, llvm::StringRef Label, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1259 | |
| 1260 | // Constructors |
| 1261 | AsmLabelAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1262 | , llvm::StringRef Label |
| 1263 | , bool IsLiteralLabel |
| 1264 | ); |
| 1265 | AsmLabelAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1266 | , llvm::StringRef Label |
| 1267 | ); |
| 1268 | |
| 1269 | AsmLabelAttr *clone(ASTContext &C) const; |
| 1270 | void printPretty(raw_ostream &OS, |
| 1271 | const PrintingPolicy &Policy) const; |
| 1272 | const char *getSpelling() const; |
| 1273 | llvm::StringRef getLabel() const { |
| 1274 | return llvm::StringRef(label, labelLength); |
| 1275 | } |
| 1276 | unsigned getLabelLength() const { |
| 1277 | return labelLength; |
| 1278 | } |
| 1279 | void setLabel(ASTContext &C, llvm::StringRef S) { |
| 1280 | labelLength = S.size(); |
| 1281 | this->label = new (C, 1) char [labelLength]; |
| 1282 | if (!S.empty()) |
| 1283 | std::memcpy(this->label, S.data(), labelLength); |
| 1284 | } |
| 1285 | |
| 1286 | bool getIsLiteralLabel() const { |
| 1287 | return isLiteralLabel; |
| 1288 | } |
| 1289 | |
| 1290 | |
| 1291 | bool isEquivalent(AsmLabelAttr *Other) const { |
| 1292 | return getLabel() == Other->getLabel() && getIsLiteralLabel() == Other->getIsLiteralLabel(); |
| 1293 | } |
| 1294 | |
| 1295 | |
| 1296 | static bool classof(const Attr *A) { return A->getKind() == attr::AsmLabel; } |
| 1297 | }; |
| 1298 | |
| 1299 | class AssertCapabilityAttr : public InheritableAttr { |
| 1300 | unsigned args_Size; |
| 1301 | Expr * *args_; |
| 1302 | |
| 1303 | public: |
| 1304 | enum Spelling { |
| 1305 | GNU_assert_capability = 0, |
| 1306 | CXX11_clang_assert_capability = 1, |
| 1307 | GNU_assert_shared_capability = 2, |
| 1308 | CXX11_clang_assert_shared_capability = 3, |
| 1309 | SpellingNotCalculated = 15 |
| 1310 | |
| 1311 | }; |
| 1312 | |
| 1313 | // Factory methods |
| 1314 | static AssertCapabilityAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1315 | static AssertCapabilityAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 1316 | static AssertCapabilityAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, AssertCapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 1317 | static AssertCapabilityAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, AssertCapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 1318 | |
| 1319 | // Constructors |
| 1320 | AssertCapabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1321 | , Expr * *Args, unsigned ArgsSize |
| 1322 | ); |
| 1323 | AssertCapabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1324 | ); |
| 1325 | |
| 1326 | AssertCapabilityAttr *clone(ASTContext &C) const; |
| 1327 | void printPretty(raw_ostream &OS, |
| 1328 | const PrintingPolicy &Policy) const; |
| 1329 | const char *getSpelling() const; |
| 1330 | Spelling getSemanticSpelling() const; |
| 1331 | bool isShared() const { return getAttributeSpellingListIndex() == 2 || |
| 1332 | getAttributeSpellingListIndex() == 3; } |
| 1333 | typedef Expr ** args_iterator; |
| 1334 | args_iterator args_begin() const { return args_; } |
| 1335 | args_iterator args_end() const { return args_ + args_Size; } |
| 1336 | unsigned args_size() const { return args_Size; } |
| 1337 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 1338 | |
| 1339 | |
| 1340 | |
| 1341 | |
| 1342 | static bool classof(const Attr *A) { return A->getKind() == attr::AssertCapability; } |
| 1343 | }; |
| 1344 | |
| 1345 | class AssertExclusiveLockAttr : public InheritableAttr { |
| 1346 | unsigned args_Size; |
| 1347 | Expr * *args_; |
| 1348 | |
| 1349 | public: |
| 1350 | // Factory methods |
| 1351 | static AssertExclusiveLockAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1352 | static AssertExclusiveLockAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 1353 | static AssertExclusiveLockAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1354 | static AssertExclusiveLockAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1355 | |
| 1356 | // Constructors |
| 1357 | AssertExclusiveLockAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1358 | , Expr * *Args, unsigned ArgsSize |
| 1359 | ); |
| 1360 | AssertExclusiveLockAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1361 | ); |
| 1362 | |
| 1363 | AssertExclusiveLockAttr *clone(ASTContext &C) const; |
| 1364 | void printPretty(raw_ostream &OS, |
| 1365 | const PrintingPolicy &Policy) const; |
| 1366 | const char *getSpelling() const; |
| 1367 | typedef Expr ** args_iterator; |
| 1368 | args_iterator args_begin() const { return args_; } |
| 1369 | args_iterator args_end() const { return args_ + args_Size; } |
| 1370 | unsigned args_size() const { return args_Size; } |
| 1371 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 1372 | |
| 1373 | |
| 1374 | |
| 1375 | |
| 1376 | static bool classof(const Attr *A) { return A->getKind() == attr::AssertExclusiveLock; } |
| 1377 | }; |
| 1378 | |
| 1379 | class AssertSharedLockAttr : public InheritableAttr { |
| 1380 | unsigned args_Size; |
| 1381 | Expr * *args_; |
| 1382 | |
| 1383 | public: |
| 1384 | // Factory methods |
| 1385 | static AssertSharedLockAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1386 | static AssertSharedLockAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 1387 | static AssertSharedLockAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1388 | static AssertSharedLockAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1389 | |
| 1390 | // Constructors |
| 1391 | AssertSharedLockAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1392 | , Expr * *Args, unsigned ArgsSize |
| 1393 | ); |
| 1394 | AssertSharedLockAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1395 | ); |
| 1396 | |
| 1397 | AssertSharedLockAttr *clone(ASTContext &C) const; |
| 1398 | void printPretty(raw_ostream &OS, |
| 1399 | const PrintingPolicy &Policy) const; |
| 1400 | const char *getSpelling() const; |
| 1401 | typedef Expr ** args_iterator; |
| 1402 | args_iterator args_begin() const { return args_; } |
| 1403 | args_iterator args_end() const { return args_ + args_Size; } |
| 1404 | unsigned args_size() const { return args_Size; } |
| 1405 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 1406 | |
| 1407 | |
| 1408 | |
| 1409 | |
| 1410 | static bool classof(const Attr *A) { return A->getKind() == attr::AssertSharedLock; } |
| 1411 | }; |
| 1412 | |
| 1413 | class AssumeAlignedAttr : public InheritableAttr { |
| 1414 | Expr * alignment; |
| 1415 | |
| 1416 | Expr * offset; |
| 1417 | |
| 1418 | public: |
| 1419 | enum Spelling { |
| 1420 | GNU_assume_aligned = 0, |
| 1421 | CXX11_gnu_assume_aligned = 1, |
| 1422 | C2x_gnu_assume_aligned = 2, |
| 1423 | SpellingNotCalculated = 15 |
| 1424 | |
| 1425 | }; |
| 1426 | |
| 1427 | // Factory methods |
| 1428 | static AssumeAlignedAttr *CreateImplicit(ASTContext &Ctx, Expr * Alignment, Expr * Offset, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1429 | static AssumeAlignedAttr *Create(ASTContext &Ctx, Expr * Alignment, Expr * Offset, const AttributeCommonInfo &CommonInfo); |
| 1430 | static AssumeAlignedAttr *CreateImplicit(ASTContext &Ctx, Expr * Alignment, Expr * Offset, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1431 | static AssumeAlignedAttr *Create(ASTContext &Ctx, Expr * Alignment, Expr * Offset, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1432 | |
| 1433 | // Constructors |
| 1434 | AssumeAlignedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1435 | , Expr * Alignment |
| 1436 | , Expr * Offset |
| 1437 | ); |
| 1438 | AssumeAlignedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1439 | , Expr * Alignment |
| 1440 | ); |
| 1441 | |
| 1442 | AssumeAlignedAttr *clone(ASTContext &C) const; |
| 1443 | void printPretty(raw_ostream &OS, |
| 1444 | const PrintingPolicy &Policy) const; |
| 1445 | const char *getSpelling() const; |
| 1446 | Expr * getAlignment() const { |
| 1447 | return alignment; |
| 1448 | } |
| 1449 | |
| 1450 | Expr * getOffset() const { |
| 1451 | return offset; |
| 1452 | } |
| 1453 | |
| 1454 | |
| 1455 | |
| 1456 | static bool classof(const Attr *A) { return A->getKind() == attr::AssumeAligned; } |
| 1457 | }; |
| 1458 | |
| 1459 | class AssumptionAttr : public InheritableAttr { |
| 1460 | unsigned assumptionLength; |
| 1461 | char *assumption; |
| 1462 | |
| 1463 | public: |
| 1464 | enum Spelling { |
| 1465 | GNU_assume = 0, |
| 1466 | CXX11_clang_assume = 1, |
| 1467 | C2x_clang_assume = 2, |
| 1468 | SpellingNotCalculated = 15 |
| 1469 | |
| 1470 | }; |
| 1471 | |
| 1472 | // Factory methods |
| 1473 | static AssumptionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Assumption, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1474 | static AssumptionAttr *Create(ASTContext &Ctx, llvm::StringRef Assumption, const AttributeCommonInfo &CommonInfo); |
| 1475 | static AssumptionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Assumption, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1476 | static AssumptionAttr *Create(ASTContext &Ctx, llvm::StringRef Assumption, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1477 | |
| 1478 | // Constructors |
| 1479 | AssumptionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1480 | , llvm::StringRef Assumption |
| 1481 | ); |
| 1482 | |
| 1483 | AssumptionAttr *clone(ASTContext &C) const; |
| 1484 | void printPretty(raw_ostream &OS, |
| 1485 | const PrintingPolicy &Policy) const; |
| 1486 | const char *getSpelling() const; |
| 1487 | llvm::StringRef getAssumption() const { |
| 1488 | return llvm::StringRef(assumption, assumptionLength); |
| 1489 | } |
| 1490 | unsigned getAssumptionLength() const { |
| 1491 | return assumptionLength; |
| 1492 | } |
| 1493 | void setAssumption(ASTContext &C, llvm::StringRef S) { |
| 1494 | assumptionLength = S.size(); |
| 1495 | this->assumption = new (C, 1) char [assumptionLength]; |
| 1496 | if (!S.empty()) |
| 1497 | std::memcpy(this->assumption, S.data(), assumptionLength); |
| 1498 | } |
| 1499 | |
| 1500 | |
| 1501 | |
| 1502 | static bool classof(const Attr *A) { return A->getKind() == attr::Assumption; } |
| 1503 | }; |
| 1504 | |
| 1505 | class AvailabilityAttr : public InheritableAttr { |
| 1506 | IdentifierInfo * platform; |
| 1507 | |
| 1508 | VersionTuple introduced; |
| 1509 | |
| 1510 | |
| 1511 | VersionTuple deprecated; |
| 1512 | |
| 1513 | |
| 1514 | VersionTuple obsoleted; |
| 1515 | |
| 1516 | |
| 1517 | bool unavailable; |
| 1518 | |
| 1519 | unsigned messageLength; |
| 1520 | char *message; |
| 1521 | |
| 1522 | bool strict; |
| 1523 | |
| 1524 | unsigned replacementLength; |
| 1525 | char *replacement; |
| 1526 | |
| 1527 | int priority; |
| 1528 | |
| 1529 | public: |
| 1530 | enum Spelling { |
| 1531 | GNU_availability = 0, |
| 1532 | CXX11_clang_availability = 1, |
| 1533 | C2x_clang_availability = 2, |
| 1534 | SpellingNotCalculated = 15 |
| 1535 | |
| 1536 | }; |
| 1537 | |
| 1538 | // Factory methods |
| 1539 | static AvailabilityAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool Unavailable, llvm::StringRef Message, bool Strict, llvm::StringRef Replacement, int Priority, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1540 | static AvailabilityAttr *Create(ASTContext &Ctx, IdentifierInfo * Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool Unavailable, llvm::StringRef Message, bool Strict, llvm::StringRef Replacement, int Priority, const AttributeCommonInfo &CommonInfo); |
| 1541 | static AvailabilityAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool Unavailable, llvm::StringRef Message, bool Strict, llvm::StringRef Replacement, int Priority, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1542 | static AvailabilityAttr *Create(ASTContext &Ctx, IdentifierInfo * Platform, VersionTuple Introduced, VersionTuple Deprecated, VersionTuple Obsoleted, bool Unavailable, llvm::StringRef Message, bool Strict, llvm::StringRef Replacement, int Priority, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1543 | |
| 1544 | // Constructors |
| 1545 | AvailabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1546 | , IdentifierInfo * Platform |
| 1547 | , VersionTuple Introduced |
| 1548 | , VersionTuple Deprecated |
| 1549 | , VersionTuple Obsoleted |
| 1550 | , bool Unavailable |
| 1551 | , llvm::StringRef Message |
| 1552 | , bool Strict |
| 1553 | , llvm::StringRef Replacement |
| 1554 | , int Priority |
| 1555 | ); |
| 1556 | |
| 1557 | AvailabilityAttr *clone(ASTContext &C) const; |
| 1558 | void printPretty(raw_ostream &OS, |
| 1559 | const PrintingPolicy &Policy) const; |
| 1560 | const char *getSpelling() const; |
| 1561 | IdentifierInfo * getPlatform() const { |
| 1562 | return platform; |
| 1563 | } |
| 1564 | |
| 1565 | VersionTuple getIntroduced() const { |
| 1566 | return introduced; |
| 1567 | } |
| 1568 | void setIntroduced(ASTContext &C, VersionTuple V) { |
| 1569 | introduced = V; |
| 1570 | } |
| 1571 | |
| 1572 | VersionTuple getDeprecated() const { |
| 1573 | return deprecated; |
| 1574 | } |
| 1575 | void setDeprecated(ASTContext &C, VersionTuple V) { |
| 1576 | deprecated = V; |
| 1577 | } |
| 1578 | |
| 1579 | VersionTuple getObsoleted() const { |
| 1580 | return obsoleted; |
| 1581 | } |
| 1582 | void setObsoleted(ASTContext &C, VersionTuple V) { |
| 1583 | obsoleted = V; |
| 1584 | } |
| 1585 | |
| 1586 | bool getUnavailable() const { |
| 1587 | return unavailable; |
| 1588 | } |
| 1589 | |
| 1590 | llvm::StringRef getMessage() const { |
| 1591 | return llvm::StringRef(message, messageLength); |
| 1592 | } |
| 1593 | unsigned getMessageLength() const { |
| 1594 | return messageLength; |
| 1595 | } |
| 1596 | void setMessage(ASTContext &C, llvm::StringRef S) { |
| 1597 | messageLength = S.size(); |
| 1598 | this->message = new (C, 1) char [messageLength]; |
| 1599 | if (!S.empty()) |
| 1600 | std::memcpy(this->message, S.data(), messageLength); |
| 1601 | } |
| 1602 | |
| 1603 | bool getStrict() const { |
| 1604 | return strict; |
| 1605 | } |
| 1606 | |
| 1607 | llvm::StringRef getReplacement() const { |
| 1608 | return llvm::StringRef(replacement, replacementLength); |
| 1609 | } |
| 1610 | unsigned getReplacementLength() const { |
| 1611 | return replacementLength; |
| 1612 | } |
| 1613 | void setReplacement(ASTContext &C, llvm::StringRef S) { |
| 1614 | replacementLength = S.size(); |
| 1615 | this->replacement = new (C, 1) char [replacementLength]; |
| 1616 | if (!S.empty()) |
| 1617 | std::memcpy(this->replacement, S.data(), replacementLength); |
| 1618 | } |
| 1619 | |
| 1620 | int getPriority() const { |
| 1621 | return priority; |
| 1622 | } |
| 1623 | |
| 1624 | static llvm::StringRef getPrettyPlatformName(llvm::StringRef Platform) { |
| 1625 | return llvm::StringSwitch<llvm::StringRef>(Platform) |
| 1626 | .Case("android" , "Android" ) |
| 1627 | .Case("ios" , "iOS" ) |
| 1628 | .Case("macos" , "macOS" ) |
| 1629 | .Case("tvos" , "tvOS" ) |
| 1630 | .Case("watchos" , "watchOS" ) |
| 1631 | .Case("ios_app_extension" , "iOS (App Extension)" ) |
| 1632 | .Case("macos_app_extension" , "macOS (App Extension)" ) |
| 1633 | .Case("tvos_app_extension" , "tvOS (App Extension)" ) |
| 1634 | .Case("watchos_app_extension" , "watchOS (App Extension)" ) |
| 1635 | .Case("swift" , "Swift" ) |
| 1636 | .Default(llvm::StringRef()); |
| 1637 | } |
| 1638 | static llvm::StringRef getPlatformNameSourceSpelling(llvm::StringRef Platform) { |
| 1639 | return llvm::StringSwitch<llvm::StringRef>(Platform) |
| 1640 | .Case("ios" , "iOS" ) |
| 1641 | .Case("macos" , "macOS" ) |
| 1642 | .Case("tvos" , "tvOS" ) |
| 1643 | .Case("watchos" , "watchOS" ) |
| 1644 | .Case("ios_app_extension" , "iOSApplicationExtension" ) |
| 1645 | .Case("macos_app_extension" , "macOSApplicationExtension" ) |
| 1646 | .Case("tvos_app_extension" , "tvOSApplicationExtension" ) |
| 1647 | .Case("watchos_app_extension" , "watchOSApplicationExtension" ) |
| 1648 | .Case("zos" , "z/OS" ) |
| 1649 | .Default(Platform); |
| 1650 | } |
| 1651 | static llvm::StringRef canonicalizePlatformName(llvm::StringRef Platform) { |
| 1652 | return llvm::StringSwitch<llvm::StringRef>(Platform) |
| 1653 | .Case("iOS" , "ios" ) |
| 1654 | .Case("macOS" , "macos" ) |
| 1655 | .Case("tvOS" , "tvos" ) |
| 1656 | .Case("watchOS" , "watchos" ) |
| 1657 | .Case("iOSApplicationExtension" , "ios_app_extension" ) |
| 1658 | .Case("macOSApplicationExtension" , "macos_app_extension" ) |
| 1659 | .Case("tvOSApplicationExtension" , "tvos_app_extension" ) |
| 1660 | .Case("watchOSApplicationExtension" , "watchos_app_extension" ) |
| 1661 | .Default(Platform); |
| 1662 | } |
| 1663 | |
| 1664 | static bool classof(const Attr *A) { return A->getKind() == attr::Availability; } |
| 1665 | }; |
| 1666 | |
| 1667 | class BPFPreserveAccessIndexAttr : public InheritableAttr { |
| 1668 | public: |
| 1669 | enum Spelling { |
| 1670 | GNU_preserve_access_index = 0, |
| 1671 | CXX11_clang_preserve_access_index = 1, |
| 1672 | C2x_clang_preserve_access_index = 2, |
| 1673 | SpellingNotCalculated = 15 |
| 1674 | |
| 1675 | }; |
| 1676 | |
| 1677 | // Factory methods |
| 1678 | static BPFPreserveAccessIndexAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1679 | static BPFPreserveAccessIndexAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1680 | static BPFPreserveAccessIndexAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1681 | static BPFPreserveAccessIndexAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1682 | |
| 1683 | // Constructors |
| 1684 | BPFPreserveAccessIndexAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1685 | ); |
| 1686 | |
| 1687 | BPFPreserveAccessIndexAttr *clone(ASTContext &C) const; |
| 1688 | void printPretty(raw_ostream &OS, |
| 1689 | const PrintingPolicy &Policy) const; |
| 1690 | const char *getSpelling() const; |
| 1691 | |
| 1692 | |
| 1693 | static bool classof(const Attr *A) { return A->getKind() == attr::BPFPreserveAccessIndex; } |
| 1694 | }; |
| 1695 | |
| 1696 | class BlocksAttr : public InheritableAttr { |
| 1697 | public: |
| 1698 | enum BlockType { |
| 1699 | ByRef |
| 1700 | }; |
| 1701 | private: |
| 1702 | BlockType type; |
| 1703 | |
| 1704 | public: |
| 1705 | enum Spelling { |
| 1706 | GNU_blocks = 0, |
| 1707 | CXX11_clang_blocks = 1, |
| 1708 | C2x_clang_blocks = 2, |
| 1709 | SpellingNotCalculated = 15 |
| 1710 | |
| 1711 | }; |
| 1712 | |
| 1713 | // Factory methods |
| 1714 | static BlocksAttr *CreateImplicit(ASTContext &Ctx, BlockType Type, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1715 | static BlocksAttr *Create(ASTContext &Ctx, BlockType Type, const AttributeCommonInfo &CommonInfo); |
| 1716 | static BlocksAttr *CreateImplicit(ASTContext &Ctx, BlockType Type, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1717 | static BlocksAttr *Create(ASTContext &Ctx, BlockType Type, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1718 | |
| 1719 | // Constructors |
| 1720 | BlocksAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1721 | , BlockType Type |
| 1722 | ); |
| 1723 | |
| 1724 | BlocksAttr *clone(ASTContext &C) const; |
| 1725 | void printPretty(raw_ostream &OS, |
| 1726 | const PrintingPolicy &Policy) const; |
| 1727 | const char *getSpelling() const; |
| 1728 | BlockType getType() const { |
| 1729 | return type; |
| 1730 | } |
| 1731 | |
| 1732 | static bool ConvertStrToBlockType(StringRef Val, BlockType &Out); |
| 1733 | static const char *ConvertBlockTypeToStr(BlockType Val); |
| 1734 | |
| 1735 | |
| 1736 | static bool classof(const Attr *A) { return A->getKind() == attr::Blocks; } |
| 1737 | }; |
| 1738 | |
| 1739 | class BuiltinAttr : public InheritableAttr { |
| 1740 | unsigned iD; |
| 1741 | |
| 1742 | public: |
| 1743 | // Factory methods |
| 1744 | static BuiltinAttr *CreateImplicit(ASTContext &Ctx, unsigned ID, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1745 | static BuiltinAttr *Create(ASTContext &Ctx, unsigned ID, const AttributeCommonInfo &CommonInfo); |
| 1746 | static BuiltinAttr *CreateImplicit(ASTContext &Ctx, unsigned ID, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1747 | static BuiltinAttr *Create(ASTContext &Ctx, unsigned ID, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1748 | |
| 1749 | // Constructors |
| 1750 | BuiltinAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1751 | , unsigned ID |
| 1752 | ); |
| 1753 | |
| 1754 | BuiltinAttr *clone(ASTContext &C) const; |
| 1755 | void printPretty(raw_ostream &OS, |
| 1756 | const PrintingPolicy &Policy) const; |
| 1757 | const char *getSpelling() const; |
| 1758 | unsigned getID() const { |
| 1759 | return iD; |
| 1760 | } |
| 1761 | |
| 1762 | |
| 1763 | |
| 1764 | static bool classof(const Attr *A) { return A->getKind() == attr::Builtin; } |
| 1765 | }; |
| 1766 | |
| 1767 | class C11NoReturnAttr : public InheritableAttr { |
| 1768 | public: |
| 1769 | // Factory methods |
| 1770 | static C11NoReturnAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1771 | static C11NoReturnAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1772 | static C11NoReturnAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1773 | static C11NoReturnAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1774 | |
| 1775 | // Constructors |
| 1776 | C11NoReturnAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1777 | ); |
| 1778 | |
| 1779 | C11NoReturnAttr *clone(ASTContext &C) const; |
| 1780 | void printPretty(raw_ostream &OS, |
| 1781 | const PrintingPolicy &Policy) const; |
| 1782 | const char *getSpelling() const; |
| 1783 | |
| 1784 | |
| 1785 | static bool classof(const Attr *A) { return A->getKind() == attr::C11NoReturn; } |
| 1786 | }; |
| 1787 | |
| 1788 | class CDeclAttr : public InheritableAttr { |
| 1789 | public: |
| 1790 | enum Spelling { |
| 1791 | GNU_cdecl = 0, |
| 1792 | CXX11_gnu_cdecl = 1, |
| 1793 | C2x_gnu_cdecl = 2, |
| 1794 | Keyword_cdecl = 3, |
| 1795 | SpellingNotCalculated = 15 |
| 1796 | |
| 1797 | }; |
| 1798 | |
| 1799 | // Factory methods |
| 1800 | static CDeclAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1801 | static CDeclAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1802 | static CDeclAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1803 | static CDeclAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1804 | |
| 1805 | // Constructors |
| 1806 | CDeclAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1807 | ); |
| 1808 | |
| 1809 | CDeclAttr *clone(ASTContext &C) const; |
| 1810 | void printPretty(raw_ostream &OS, |
| 1811 | const PrintingPolicy &Policy) const; |
| 1812 | const char *getSpelling() const; |
| 1813 | |
| 1814 | |
| 1815 | static bool classof(const Attr *A) { return A->getKind() == attr::CDecl; } |
| 1816 | }; |
| 1817 | |
| 1818 | class CFAuditedTransferAttr : public InheritableAttr { |
| 1819 | public: |
| 1820 | enum Spelling { |
| 1821 | GNU_cf_audited_transfer = 0, |
| 1822 | CXX11_clang_cf_audited_transfer = 1, |
| 1823 | C2x_clang_cf_audited_transfer = 2, |
| 1824 | SpellingNotCalculated = 15 |
| 1825 | |
| 1826 | }; |
| 1827 | |
| 1828 | // Factory methods |
| 1829 | static CFAuditedTransferAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1830 | static CFAuditedTransferAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1831 | static CFAuditedTransferAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1832 | static CFAuditedTransferAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1833 | |
| 1834 | // Constructors |
| 1835 | CFAuditedTransferAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1836 | ); |
| 1837 | |
| 1838 | CFAuditedTransferAttr *clone(ASTContext &C) const; |
| 1839 | void printPretty(raw_ostream &OS, |
| 1840 | const PrintingPolicy &Policy) const; |
| 1841 | const char *getSpelling() const; |
| 1842 | |
| 1843 | |
| 1844 | static bool classof(const Attr *A) { return A->getKind() == attr::CFAuditedTransfer; } |
| 1845 | }; |
| 1846 | |
| 1847 | class CFConsumedAttr : public InheritableParamAttr { |
| 1848 | public: |
| 1849 | enum Spelling { |
| 1850 | GNU_cf_consumed = 0, |
| 1851 | CXX11_clang_cf_consumed = 1, |
| 1852 | C2x_clang_cf_consumed = 2, |
| 1853 | SpellingNotCalculated = 15 |
| 1854 | |
| 1855 | }; |
| 1856 | |
| 1857 | // Factory methods |
| 1858 | static CFConsumedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1859 | static CFConsumedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1860 | static CFConsumedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1861 | static CFConsumedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1862 | |
| 1863 | // Constructors |
| 1864 | CFConsumedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1865 | ); |
| 1866 | |
| 1867 | CFConsumedAttr *clone(ASTContext &C) const; |
| 1868 | void printPretty(raw_ostream &OS, |
| 1869 | const PrintingPolicy &Policy) const; |
| 1870 | const char *getSpelling() const; |
| 1871 | |
| 1872 | |
| 1873 | static bool classof(const Attr *A) { return A->getKind() == attr::CFConsumed; } |
| 1874 | }; |
| 1875 | |
| 1876 | class CFGuardAttr : public InheritableAttr { |
| 1877 | public: |
| 1878 | enum GuardArg { |
| 1879 | nocf |
| 1880 | }; |
| 1881 | private: |
| 1882 | GuardArg guard; |
| 1883 | |
| 1884 | public: |
| 1885 | // Factory methods |
| 1886 | static CFGuardAttr *CreateImplicit(ASTContext &Ctx, GuardArg Guard, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1887 | static CFGuardAttr *Create(ASTContext &Ctx, GuardArg Guard, const AttributeCommonInfo &CommonInfo); |
| 1888 | static CFGuardAttr *CreateImplicit(ASTContext &Ctx, GuardArg Guard, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1889 | static CFGuardAttr *Create(ASTContext &Ctx, GuardArg Guard, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1890 | |
| 1891 | // Constructors |
| 1892 | CFGuardAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1893 | , GuardArg Guard |
| 1894 | ); |
| 1895 | |
| 1896 | CFGuardAttr *clone(ASTContext &C) const; |
| 1897 | void printPretty(raw_ostream &OS, |
| 1898 | const PrintingPolicy &Policy) const; |
| 1899 | const char *getSpelling() const; |
| 1900 | GuardArg getGuard() const { |
| 1901 | return guard; |
| 1902 | } |
| 1903 | |
| 1904 | static bool ConvertStrToGuardArg(StringRef Val, GuardArg &Out); |
| 1905 | static const char *ConvertGuardArgToStr(GuardArg Val); |
| 1906 | |
| 1907 | |
| 1908 | static bool classof(const Attr *A) { return A->getKind() == attr::CFGuard; } |
| 1909 | }; |
| 1910 | |
| 1911 | class CFICanonicalJumpTableAttr : public InheritableAttr { |
| 1912 | public: |
| 1913 | enum Spelling { |
| 1914 | GNU_cfi_canonical_jump_table = 0, |
| 1915 | CXX11_clang_cfi_canonical_jump_table = 1, |
| 1916 | C2x_clang_cfi_canonical_jump_table = 2, |
| 1917 | SpellingNotCalculated = 15 |
| 1918 | |
| 1919 | }; |
| 1920 | |
| 1921 | // Factory methods |
| 1922 | static CFICanonicalJumpTableAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1923 | static CFICanonicalJumpTableAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1924 | static CFICanonicalJumpTableAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1925 | static CFICanonicalJumpTableAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1926 | |
| 1927 | // Constructors |
| 1928 | CFICanonicalJumpTableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1929 | ); |
| 1930 | |
| 1931 | CFICanonicalJumpTableAttr *clone(ASTContext &C) const; |
| 1932 | void printPretty(raw_ostream &OS, |
| 1933 | const PrintingPolicy &Policy) const; |
| 1934 | const char *getSpelling() const; |
| 1935 | |
| 1936 | |
| 1937 | static bool classof(const Attr *A) { return A->getKind() == attr::CFICanonicalJumpTable; } |
| 1938 | }; |
| 1939 | |
| 1940 | class CFReturnsNotRetainedAttr : public InheritableAttr { |
| 1941 | public: |
| 1942 | enum Spelling { |
| 1943 | GNU_cf_returns_not_retained = 0, |
| 1944 | CXX11_clang_cf_returns_not_retained = 1, |
| 1945 | C2x_clang_cf_returns_not_retained = 2, |
| 1946 | SpellingNotCalculated = 15 |
| 1947 | |
| 1948 | }; |
| 1949 | |
| 1950 | // Factory methods |
| 1951 | static CFReturnsNotRetainedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1952 | static CFReturnsNotRetainedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1953 | static CFReturnsNotRetainedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1954 | static CFReturnsNotRetainedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1955 | |
| 1956 | // Constructors |
| 1957 | CFReturnsNotRetainedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1958 | ); |
| 1959 | |
| 1960 | CFReturnsNotRetainedAttr *clone(ASTContext &C) const; |
| 1961 | void printPretty(raw_ostream &OS, |
| 1962 | const PrintingPolicy &Policy) const; |
| 1963 | const char *getSpelling() const; |
| 1964 | |
| 1965 | |
| 1966 | static bool classof(const Attr *A) { return A->getKind() == attr::CFReturnsNotRetained; } |
| 1967 | }; |
| 1968 | |
| 1969 | class CFReturnsRetainedAttr : public InheritableAttr { |
| 1970 | public: |
| 1971 | enum Spelling { |
| 1972 | GNU_cf_returns_retained = 0, |
| 1973 | CXX11_clang_cf_returns_retained = 1, |
| 1974 | C2x_clang_cf_returns_retained = 2, |
| 1975 | SpellingNotCalculated = 15 |
| 1976 | |
| 1977 | }; |
| 1978 | |
| 1979 | // Factory methods |
| 1980 | static CFReturnsRetainedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 1981 | static CFReturnsRetainedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 1982 | static CFReturnsRetainedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1983 | static CFReturnsRetainedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 1984 | |
| 1985 | // Constructors |
| 1986 | CFReturnsRetainedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 1987 | ); |
| 1988 | |
| 1989 | CFReturnsRetainedAttr *clone(ASTContext &C) const; |
| 1990 | void printPretty(raw_ostream &OS, |
| 1991 | const PrintingPolicy &Policy) const; |
| 1992 | const char *getSpelling() const; |
| 1993 | |
| 1994 | |
| 1995 | static bool classof(const Attr *A) { return A->getKind() == attr::CFReturnsRetained; } |
| 1996 | }; |
| 1997 | |
| 1998 | class CFUnknownTransferAttr : public InheritableAttr { |
| 1999 | public: |
| 2000 | enum Spelling { |
| 2001 | GNU_cf_unknown_transfer = 0, |
| 2002 | CXX11_clang_cf_unknown_transfer = 1, |
| 2003 | C2x_clang_cf_unknown_transfer = 2, |
| 2004 | SpellingNotCalculated = 15 |
| 2005 | |
| 2006 | }; |
| 2007 | |
| 2008 | // Factory methods |
| 2009 | static CFUnknownTransferAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2010 | static CFUnknownTransferAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2011 | static CFUnknownTransferAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2012 | static CFUnknownTransferAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2013 | |
| 2014 | // Constructors |
| 2015 | CFUnknownTransferAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2016 | ); |
| 2017 | |
| 2018 | CFUnknownTransferAttr *clone(ASTContext &C) const; |
| 2019 | void printPretty(raw_ostream &OS, |
| 2020 | const PrintingPolicy &Policy) const; |
| 2021 | const char *getSpelling() const; |
| 2022 | |
| 2023 | |
| 2024 | static bool classof(const Attr *A) { return A->getKind() == attr::CFUnknownTransfer; } |
| 2025 | }; |
| 2026 | |
| 2027 | class CPUDispatchAttr : public InheritableAttr { |
| 2028 | unsigned cpus_Size; |
| 2029 | IdentifierInfo * *cpus_; |
| 2030 | |
| 2031 | public: |
| 2032 | enum Spelling { |
| 2033 | GNU_cpu_dispatch = 0, |
| 2034 | CXX11_clang_cpu_dispatch = 1, |
| 2035 | C2x_clang_cpu_dispatch = 2, |
| 2036 | Declspec_cpu_dispatch = 3, |
| 2037 | SpellingNotCalculated = 15 |
| 2038 | |
| 2039 | }; |
| 2040 | |
| 2041 | // Factory methods |
| 2042 | static CPUDispatchAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * *Cpus, unsigned CpusSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2043 | static CPUDispatchAttr *Create(ASTContext &Ctx, IdentifierInfo * *Cpus, unsigned CpusSize, const AttributeCommonInfo &CommonInfo); |
| 2044 | static CPUDispatchAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * *Cpus, unsigned CpusSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2045 | static CPUDispatchAttr *Create(ASTContext &Ctx, IdentifierInfo * *Cpus, unsigned CpusSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2046 | |
| 2047 | // Constructors |
| 2048 | CPUDispatchAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2049 | , IdentifierInfo * *Cpus, unsigned CpusSize |
| 2050 | ); |
| 2051 | CPUDispatchAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2052 | ); |
| 2053 | |
| 2054 | CPUDispatchAttr *clone(ASTContext &C) const; |
| 2055 | void printPretty(raw_ostream &OS, |
| 2056 | const PrintingPolicy &Policy) const; |
| 2057 | const char *getSpelling() const; |
| 2058 | typedef IdentifierInfo ** cpus_iterator; |
| 2059 | cpus_iterator cpus_begin() const { return cpus_; } |
| 2060 | cpus_iterator cpus_end() const { return cpus_ + cpus_Size; } |
| 2061 | unsigned cpus_size() const { return cpus_Size; } |
| 2062 | llvm::iterator_range<cpus_iterator> cpus() const { return llvm::make_range(cpus_begin(), cpus_end()); } |
| 2063 | |
| 2064 | |
| 2065 | |
| 2066 | |
| 2067 | static bool classof(const Attr *A) { return A->getKind() == attr::CPUDispatch; } |
| 2068 | }; |
| 2069 | |
| 2070 | class CPUSpecificAttr : public InheritableAttr { |
| 2071 | unsigned cpus_Size; |
| 2072 | IdentifierInfo * *cpus_; |
| 2073 | |
| 2074 | public: |
| 2075 | enum Spelling { |
| 2076 | GNU_cpu_specific = 0, |
| 2077 | CXX11_clang_cpu_specific = 1, |
| 2078 | C2x_clang_cpu_specific = 2, |
| 2079 | Declspec_cpu_specific = 3, |
| 2080 | SpellingNotCalculated = 15 |
| 2081 | |
| 2082 | }; |
| 2083 | |
| 2084 | // Factory methods |
| 2085 | static CPUSpecificAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * *Cpus, unsigned CpusSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2086 | static CPUSpecificAttr *Create(ASTContext &Ctx, IdentifierInfo * *Cpus, unsigned CpusSize, const AttributeCommonInfo &CommonInfo); |
| 2087 | static CPUSpecificAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * *Cpus, unsigned CpusSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2088 | static CPUSpecificAttr *Create(ASTContext &Ctx, IdentifierInfo * *Cpus, unsigned CpusSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2089 | |
| 2090 | // Constructors |
| 2091 | CPUSpecificAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2092 | , IdentifierInfo * *Cpus, unsigned CpusSize |
| 2093 | ); |
| 2094 | CPUSpecificAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2095 | ); |
| 2096 | |
| 2097 | CPUSpecificAttr *clone(ASTContext &C) const; |
| 2098 | void printPretty(raw_ostream &OS, |
| 2099 | const PrintingPolicy &Policy) const; |
| 2100 | const char *getSpelling() const; |
| 2101 | typedef IdentifierInfo ** cpus_iterator; |
| 2102 | cpus_iterator cpus_begin() const { return cpus_; } |
| 2103 | cpus_iterator cpus_end() const { return cpus_ + cpus_Size; } |
| 2104 | unsigned cpus_size() const { return cpus_Size; } |
| 2105 | llvm::iterator_range<cpus_iterator> cpus() const { return llvm::make_range(cpus_begin(), cpus_end()); } |
| 2106 | |
| 2107 | |
| 2108 | |
| 2109 | IdentifierInfo *getCPUName(unsigned Index) const { |
| 2110 | return *(cpus_begin() + Index); |
| 2111 | } |
| 2112 | |
| 2113 | |
| 2114 | static bool classof(const Attr *A) { return A->getKind() == attr::CPUSpecific; } |
| 2115 | }; |
| 2116 | |
| 2117 | class CUDAConstantAttr : public InheritableAttr { |
| 2118 | public: |
| 2119 | enum Spelling { |
| 2120 | GNU_constant = 0, |
| 2121 | Declspec_constant = 1, |
| 2122 | SpellingNotCalculated = 15 |
| 2123 | |
| 2124 | }; |
| 2125 | |
| 2126 | // Factory methods |
| 2127 | static CUDAConstantAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2128 | static CUDAConstantAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2129 | static CUDAConstantAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2130 | static CUDAConstantAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2131 | |
| 2132 | // Constructors |
| 2133 | CUDAConstantAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2134 | ); |
| 2135 | |
| 2136 | CUDAConstantAttr *clone(ASTContext &C) const; |
| 2137 | void printPretty(raw_ostream &OS, |
| 2138 | const PrintingPolicy &Policy) const; |
| 2139 | const char *getSpelling() const; |
| 2140 | |
| 2141 | |
| 2142 | static bool classof(const Attr *A) { return A->getKind() == attr::CUDAConstant; } |
| 2143 | }; |
| 2144 | |
| 2145 | class CUDADeviceAttr : public InheritableAttr { |
| 2146 | public: |
| 2147 | enum Spelling { |
| 2148 | GNU_device = 0, |
| 2149 | Declspec_device = 1, |
| 2150 | SpellingNotCalculated = 15 |
| 2151 | |
| 2152 | }; |
| 2153 | |
| 2154 | // Factory methods |
| 2155 | static CUDADeviceAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2156 | static CUDADeviceAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2157 | static CUDADeviceAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2158 | static CUDADeviceAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2159 | |
| 2160 | // Constructors |
| 2161 | CUDADeviceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2162 | ); |
| 2163 | |
| 2164 | CUDADeviceAttr *clone(ASTContext &C) const; |
| 2165 | void printPretty(raw_ostream &OS, |
| 2166 | const PrintingPolicy &Policy) const; |
| 2167 | const char *getSpelling() const; |
| 2168 | |
| 2169 | |
| 2170 | static bool classof(const Attr *A) { return A->getKind() == attr::CUDADevice; } |
| 2171 | }; |
| 2172 | |
| 2173 | class CUDADeviceBuiltinSurfaceTypeAttr : public InheritableAttr { |
| 2174 | public: |
| 2175 | enum Spelling { |
| 2176 | GNU_device_builtin_surface_type = 0, |
| 2177 | Declspec_device_builtin_surface_type = 1, |
| 2178 | SpellingNotCalculated = 15 |
| 2179 | |
| 2180 | }; |
| 2181 | |
| 2182 | // Factory methods |
| 2183 | static CUDADeviceBuiltinSurfaceTypeAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2184 | static CUDADeviceBuiltinSurfaceTypeAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2185 | static CUDADeviceBuiltinSurfaceTypeAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2186 | static CUDADeviceBuiltinSurfaceTypeAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2187 | |
| 2188 | // Constructors |
| 2189 | CUDADeviceBuiltinSurfaceTypeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2190 | ); |
| 2191 | |
| 2192 | CUDADeviceBuiltinSurfaceTypeAttr *clone(ASTContext &C) const; |
| 2193 | void printPretty(raw_ostream &OS, |
| 2194 | const PrintingPolicy &Policy) const; |
| 2195 | const char *getSpelling() const; |
| 2196 | |
| 2197 | |
| 2198 | static bool classof(const Attr *A) { return A->getKind() == attr::CUDADeviceBuiltinSurfaceType; } |
| 2199 | }; |
| 2200 | |
| 2201 | class CUDADeviceBuiltinTextureTypeAttr : public InheritableAttr { |
| 2202 | public: |
| 2203 | enum Spelling { |
| 2204 | GNU_device_builtin_texture_type = 0, |
| 2205 | Declspec_device_builtin_texture_type = 1, |
| 2206 | SpellingNotCalculated = 15 |
| 2207 | |
| 2208 | }; |
| 2209 | |
| 2210 | // Factory methods |
| 2211 | static CUDADeviceBuiltinTextureTypeAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2212 | static CUDADeviceBuiltinTextureTypeAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2213 | static CUDADeviceBuiltinTextureTypeAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2214 | static CUDADeviceBuiltinTextureTypeAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2215 | |
| 2216 | // Constructors |
| 2217 | CUDADeviceBuiltinTextureTypeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2218 | ); |
| 2219 | |
| 2220 | CUDADeviceBuiltinTextureTypeAttr *clone(ASTContext &C) const; |
| 2221 | void printPretty(raw_ostream &OS, |
| 2222 | const PrintingPolicy &Policy) const; |
| 2223 | const char *getSpelling() const; |
| 2224 | |
| 2225 | |
| 2226 | static bool classof(const Attr *A) { return A->getKind() == attr::CUDADeviceBuiltinTextureType; } |
| 2227 | }; |
| 2228 | |
| 2229 | class CUDAGlobalAttr : public InheritableAttr { |
| 2230 | public: |
| 2231 | enum Spelling { |
| 2232 | GNU_global = 0, |
| 2233 | Declspec_global = 1, |
| 2234 | SpellingNotCalculated = 15 |
| 2235 | |
| 2236 | }; |
| 2237 | |
| 2238 | // Factory methods |
| 2239 | static CUDAGlobalAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2240 | static CUDAGlobalAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2241 | static CUDAGlobalAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2242 | static CUDAGlobalAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2243 | |
| 2244 | // Constructors |
| 2245 | CUDAGlobalAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2246 | ); |
| 2247 | |
| 2248 | CUDAGlobalAttr *clone(ASTContext &C) const; |
| 2249 | void printPretty(raw_ostream &OS, |
| 2250 | const PrintingPolicy &Policy) const; |
| 2251 | const char *getSpelling() const; |
| 2252 | |
| 2253 | |
| 2254 | static bool classof(const Attr *A) { return A->getKind() == attr::CUDAGlobal; } |
| 2255 | }; |
| 2256 | |
| 2257 | class CUDAHostAttr : public InheritableAttr { |
| 2258 | public: |
| 2259 | enum Spelling { |
| 2260 | GNU_host = 0, |
| 2261 | Declspec_host = 1, |
| 2262 | SpellingNotCalculated = 15 |
| 2263 | |
| 2264 | }; |
| 2265 | |
| 2266 | // Factory methods |
| 2267 | static CUDAHostAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2268 | static CUDAHostAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2269 | static CUDAHostAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2270 | static CUDAHostAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2271 | |
| 2272 | // Constructors |
| 2273 | CUDAHostAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2274 | ); |
| 2275 | |
| 2276 | CUDAHostAttr *clone(ASTContext &C) const; |
| 2277 | void printPretty(raw_ostream &OS, |
| 2278 | const PrintingPolicy &Policy) const; |
| 2279 | const char *getSpelling() const; |
| 2280 | |
| 2281 | |
| 2282 | static bool classof(const Attr *A) { return A->getKind() == attr::CUDAHost; } |
| 2283 | }; |
| 2284 | |
| 2285 | class CUDAInvalidTargetAttr : public InheritableAttr { |
| 2286 | public: |
| 2287 | // Factory methods |
| 2288 | static CUDAInvalidTargetAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2289 | static CUDAInvalidTargetAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2290 | static CUDAInvalidTargetAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2291 | static CUDAInvalidTargetAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2292 | |
| 2293 | // Constructors |
| 2294 | CUDAInvalidTargetAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2295 | ); |
| 2296 | |
| 2297 | CUDAInvalidTargetAttr *clone(ASTContext &C) const; |
| 2298 | void printPretty(raw_ostream &OS, |
| 2299 | const PrintingPolicy &Policy) const; |
| 2300 | const char *getSpelling() const; |
| 2301 | |
| 2302 | |
| 2303 | static bool classof(const Attr *A) { return A->getKind() == attr::CUDAInvalidTarget; } |
| 2304 | }; |
| 2305 | |
| 2306 | class CUDALaunchBoundsAttr : public InheritableAttr { |
| 2307 | Expr * maxThreads; |
| 2308 | |
| 2309 | Expr * minBlocks; |
| 2310 | |
| 2311 | public: |
| 2312 | enum Spelling { |
| 2313 | GNU_launch_bounds = 0, |
| 2314 | Declspec_launch_bounds = 1, |
| 2315 | SpellingNotCalculated = 15 |
| 2316 | |
| 2317 | }; |
| 2318 | |
| 2319 | // Factory methods |
| 2320 | static CUDALaunchBoundsAttr *CreateImplicit(ASTContext &Ctx, Expr * MaxThreads, Expr * MinBlocks, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2321 | static CUDALaunchBoundsAttr *Create(ASTContext &Ctx, Expr * MaxThreads, Expr * MinBlocks, const AttributeCommonInfo &CommonInfo); |
| 2322 | static CUDALaunchBoundsAttr *CreateImplicit(ASTContext &Ctx, Expr * MaxThreads, Expr * MinBlocks, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2323 | static CUDALaunchBoundsAttr *Create(ASTContext &Ctx, Expr * MaxThreads, Expr * MinBlocks, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2324 | |
| 2325 | // Constructors |
| 2326 | CUDALaunchBoundsAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2327 | , Expr * MaxThreads |
| 2328 | , Expr * MinBlocks |
| 2329 | ); |
| 2330 | CUDALaunchBoundsAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2331 | , Expr * MaxThreads |
| 2332 | ); |
| 2333 | |
| 2334 | CUDALaunchBoundsAttr *clone(ASTContext &C) const; |
| 2335 | void printPretty(raw_ostream &OS, |
| 2336 | const PrintingPolicy &Policy) const; |
| 2337 | const char *getSpelling() const; |
| 2338 | Expr * getMaxThreads() const { |
| 2339 | return maxThreads; |
| 2340 | } |
| 2341 | |
| 2342 | Expr * getMinBlocks() const { |
| 2343 | return minBlocks; |
| 2344 | } |
| 2345 | |
| 2346 | |
| 2347 | |
| 2348 | static bool classof(const Attr *A) { return A->getKind() == attr::CUDALaunchBounds; } |
| 2349 | }; |
| 2350 | |
| 2351 | class CUDASharedAttr : public InheritableAttr { |
| 2352 | public: |
| 2353 | enum Spelling { |
| 2354 | GNU_shared = 0, |
| 2355 | Declspec_shared = 1, |
| 2356 | SpellingNotCalculated = 15 |
| 2357 | |
| 2358 | }; |
| 2359 | |
| 2360 | // Factory methods |
| 2361 | static CUDASharedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2362 | static CUDASharedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2363 | static CUDASharedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2364 | static CUDASharedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2365 | |
| 2366 | // Constructors |
| 2367 | CUDASharedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2368 | ); |
| 2369 | |
| 2370 | CUDASharedAttr *clone(ASTContext &C) const; |
| 2371 | void printPretty(raw_ostream &OS, |
| 2372 | const PrintingPolicy &Policy) const; |
| 2373 | const char *getSpelling() const; |
| 2374 | |
| 2375 | |
| 2376 | static bool classof(const Attr *A) { return A->getKind() == attr::CUDAShared; } |
| 2377 | }; |
| 2378 | |
| 2379 | class CXX11NoReturnAttr : public InheritableAttr { |
| 2380 | public: |
| 2381 | // Factory methods |
| 2382 | static CXX11NoReturnAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2383 | static CXX11NoReturnAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2384 | static CXX11NoReturnAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2385 | static CXX11NoReturnAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2386 | |
| 2387 | // Constructors |
| 2388 | CXX11NoReturnAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2389 | ); |
| 2390 | |
| 2391 | CXX11NoReturnAttr *clone(ASTContext &C) const; |
| 2392 | void printPretty(raw_ostream &OS, |
| 2393 | const PrintingPolicy &Policy) const; |
| 2394 | const char *getSpelling() const; |
| 2395 | |
| 2396 | |
| 2397 | static bool classof(const Attr *A) { return A->getKind() == attr::CXX11NoReturn; } |
| 2398 | }; |
| 2399 | |
| 2400 | class CallableWhenAttr : public InheritableAttr { |
| 2401 | public: |
| 2402 | enum ConsumedState { |
| 2403 | Unknown, |
| 2404 | Consumed, |
| 2405 | Unconsumed |
| 2406 | }; |
| 2407 | private: |
| 2408 | unsigned callableStates_Size; |
| 2409 | ConsumedState *callableStates_; |
| 2410 | |
| 2411 | public: |
| 2412 | enum Spelling { |
| 2413 | GNU_callable_when = 0, |
| 2414 | CXX11_clang_callable_when = 1, |
| 2415 | SpellingNotCalculated = 15 |
| 2416 | |
| 2417 | }; |
| 2418 | |
| 2419 | // Factory methods |
| 2420 | static CallableWhenAttr *CreateImplicit(ASTContext &Ctx, ConsumedState *CallableStates, unsigned CallableStatesSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2421 | static CallableWhenAttr *Create(ASTContext &Ctx, ConsumedState *CallableStates, unsigned CallableStatesSize, const AttributeCommonInfo &CommonInfo); |
| 2422 | static CallableWhenAttr *CreateImplicit(ASTContext &Ctx, ConsumedState *CallableStates, unsigned CallableStatesSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2423 | static CallableWhenAttr *Create(ASTContext &Ctx, ConsumedState *CallableStates, unsigned CallableStatesSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2424 | |
| 2425 | // Constructors |
| 2426 | CallableWhenAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2427 | , ConsumedState *CallableStates, unsigned CallableStatesSize |
| 2428 | ); |
| 2429 | CallableWhenAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2430 | ); |
| 2431 | |
| 2432 | CallableWhenAttr *clone(ASTContext &C) const; |
| 2433 | void printPretty(raw_ostream &OS, |
| 2434 | const PrintingPolicy &Policy) const; |
| 2435 | const char *getSpelling() const; |
| 2436 | typedef ConsumedState* callableStates_iterator; |
| 2437 | callableStates_iterator callableStates_begin() const { return callableStates_; } |
| 2438 | callableStates_iterator callableStates_end() const { return callableStates_ + callableStates_Size; } |
| 2439 | unsigned callableStates_size() const { return callableStates_Size; } |
| 2440 | llvm::iterator_range<callableStates_iterator> callableStates() const { return llvm::make_range(callableStates_begin(), callableStates_end()); } |
| 2441 | |
| 2442 | |
| 2443 | static bool ConvertStrToConsumedState(StringRef Val, ConsumedState &Out); |
| 2444 | static const char *ConvertConsumedStateToStr(ConsumedState Val); |
| 2445 | |
| 2446 | |
| 2447 | static bool classof(const Attr *A) { return A->getKind() == attr::CallableWhen; } |
| 2448 | }; |
| 2449 | |
| 2450 | class CallbackAttr : public InheritableAttr { |
| 2451 | unsigned encoding_Size; |
| 2452 | int *encoding_; |
| 2453 | |
| 2454 | public: |
| 2455 | enum Spelling { |
| 2456 | GNU_callback = 0, |
| 2457 | CXX11_clang_callback = 1, |
| 2458 | C2x_clang_callback = 2, |
| 2459 | SpellingNotCalculated = 15 |
| 2460 | |
| 2461 | }; |
| 2462 | |
| 2463 | // Factory methods |
| 2464 | static CallbackAttr *CreateImplicit(ASTContext &Ctx, int *Encoding, unsigned EncodingSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2465 | static CallbackAttr *Create(ASTContext &Ctx, int *Encoding, unsigned EncodingSize, const AttributeCommonInfo &CommonInfo); |
| 2466 | static CallbackAttr *CreateImplicit(ASTContext &Ctx, int *Encoding, unsigned EncodingSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2467 | static CallbackAttr *Create(ASTContext &Ctx, int *Encoding, unsigned EncodingSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2468 | |
| 2469 | // Constructors |
| 2470 | CallbackAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2471 | , int *Encoding, unsigned EncodingSize |
| 2472 | ); |
| 2473 | CallbackAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2474 | ); |
| 2475 | |
| 2476 | CallbackAttr *clone(ASTContext &C) const; |
| 2477 | void printPretty(raw_ostream &OS, |
| 2478 | const PrintingPolicy &Policy) const; |
| 2479 | const char *getSpelling() const; |
| 2480 | typedef int* encoding_iterator; |
| 2481 | encoding_iterator encoding_begin() const { return encoding_; } |
| 2482 | encoding_iterator encoding_end() const { return encoding_ + encoding_Size; } |
| 2483 | unsigned encoding_size() const { return encoding_Size; } |
| 2484 | llvm::iterator_range<encoding_iterator> encoding() const { return llvm::make_range(encoding_begin(), encoding_end()); } |
| 2485 | |
| 2486 | |
| 2487 | |
| 2488 | |
| 2489 | static bool classof(const Attr *A) { return A->getKind() == attr::Callback; } |
| 2490 | }; |
| 2491 | |
| 2492 | class CalledOnceAttr : public Attr { |
| 2493 | public: |
| 2494 | enum Spelling { |
| 2495 | GNU_called_once = 0, |
| 2496 | CXX11_clang_called_once = 1, |
| 2497 | C2x_clang_called_once = 2, |
| 2498 | SpellingNotCalculated = 15 |
| 2499 | |
| 2500 | }; |
| 2501 | |
| 2502 | // Factory methods |
| 2503 | static CalledOnceAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2504 | static CalledOnceAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2505 | static CalledOnceAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2506 | static CalledOnceAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2507 | |
| 2508 | // Constructors |
| 2509 | CalledOnceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2510 | ); |
| 2511 | |
| 2512 | CalledOnceAttr *clone(ASTContext &C) const; |
| 2513 | void printPretty(raw_ostream &OS, |
| 2514 | const PrintingPolicy &Policy) const; |
| 2515 | const char *getSpelling() const; |
| 2516 | |
| 2517 | |
| 2518 | static bool classof(const Attr *A) { return A->getKind() == attr::CalledOnce; } |
| 2519 | }; |
| 2520 | |
| 2521 | class CapabilityAttr : public InheritableAttr { |
| 2522 | unsigned nameLength; |
| 2523 | char *name; |
| 2524 | |
| 2525 | public: |
| 2526 | enum Spelling { |
| 2527 | GNU_capability = 0, |
| 2528 | CXX11_clang_capability = 1, |
| 2529 | GNU_shared_capability = 2, |
| 2530 | CXX11_clang_shared_capability = 3, |
| 2531 | SpellingNotCalculated = 15 |
| 2532 | |
| 2533 | }; |
| 2534 | |
| 2535 | // Factory methods |
| 2536 | static CapabilityAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2537 | static CapabilityAttr *Create(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo); |
| 2538 | static CapabilityAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax, CapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 2539 | static CapabilityAttr *Create(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax, CapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 2540 | |
| 2541 | // Constructors |
| 2542 | CapabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2543 | , llvm::StringRef Name |
| 2544 | ); |
| 2545 | |
| 2546 | CapabilityAttr *clone(ASTContext &C) const; |
| 2547 | void printPretty(raw_ostream &OS, |
| 2548 | const PrintingPolicy &Policy) const; |
| 2549 | const char *getSpelling() const; |
| 2550 | Spelling getSemanticSpelling() const; |
| 2551 | bool isShared() const { return getAttributeSpellingListIndex() == 2 || |
| 2552 | getAttributeSpellingListIndex() == 3; } |
| 2553 | llvm::StringRef getName() const { |
| 2554 | return llvm::StringRef(name, nameLength); |
| 2555 | } |
| 2556 | unsigned getNameLength() const { |
| 2557 | return nameLength; |
| 2558 | } |
| 2559 | void setName(ASTContext &C, llvm::StringRef S) { |
| 2560 | nameLength = S.size(); |
| 2561 | this->name = new (C, 1) char [nameLength]; |
| 2562 | if (!S.empty()) |
| 2563 | std::memcpy(this->name, S.data(), nameLength); |
| 2564 | } |
| 2565 | |
| 2566 | |
| 2567 | |
| 2568 | static bool classof(const Attr *A) { return A->getKind() == attr::Capability; } |
| 2569 | }; |
| 2570 | |
| 2571 | class CapturedRecordAttr : public InheritableAttr { |
| 2572 | public: |
| 2573 | // Factory methods |
| 2574 | static CapturedRecordAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2575 | static CapturedRecordAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2576 | static CapturedRecordAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2577 | static CapturedRecordAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2578 | |
| 2579 | // Constructors |
| 2580 | CapturedRecordAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2581 | ); |
| 2582 | |
| 2583 | CapturedRecordAttr *clone(ASTContext &C) const; |
| 2584 | void printPretty(raw_ostream &OS, |
| 2585 | const PrintingPolicy &Policy) const; |
| 2586 | const char *getSpelling() const; |
| 2587 | |
| 2588 | |
| 2589 | static bool classof(const Attr *A) { return A->getKind() == attr::CapturedRecord; } |
| 2590 | }; |
| 2591 | |
| 2592 | class CarriesDependencyAttr : public InheritableParamAttr { |
| 2593 | public: |
| 2594 | enum Spelling { |
| 2595 | GNU_carries_dependency = 0, |
| 2596 | CXX11_carries_dependency = 1, |
| 2597 | SpellingNotCalculated = 15 |
| 2598 | |
| 2599 | }; |
| 2600 | |
| 2601 | // Factory methods |
| 2602 | static CarriesDependencyAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2603 | static CarriesDependencyAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2604 | static CarriesDependencyAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2605 | static CarriesDependencyAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2606 | |
| 2607 | // Constructors |
| 2608 | CarriesDependencyAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2609 | ); |
| 2610 | |
| 2611 | CarriesDependencyAttr *clone(ASTContext &C) const; |
| 2612 | void printPretty(raw_ostream &OS, |
| 2613 | const PrintingPolicy &Policy) const; |
| 2614 | const char *getSpelling() const; |
| 2615 | |
| 2616 | |
| 2617 | static bool classof(const Attr *A) { return A->getKind() == attr::CarriesDependency; } |
| 2618 | }; |
| 2619 | |
| 2620 | class CleanupAttr : public InheritableAttr { |
| 2621 | FunctionDecl * functionDecl; |
| 2622 | |
| 2623 | public: |
| 2624 | enum Spelling { |
| 2625 | GNU_cleanup = 0, |
| 2626 | CXX11_gnu_cleanup = 1, |
| 2627 | C2x_gnu_cleanup = 2, |
| 2628 | SpellingNotCalculated = 15 |
| 2629 | |
| 2630 | }; |
| 2631 | |
| 2632 | // Factory methods |
| 2633 | static CleanupAttr *CreateImplicit(ASTContext &Ctx, FunctionDecl * FunctionDecl, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2634 | static CleanupAttr *Create(ASTContext &Ctx, FunctionDecl * FunctionDecl, const AttributeCommonInfo &CommonInfo); |
| 2635 | static CleanupAttr *CreateImplicit(ASTContext &Ctx, FunctionDecl * FunctionDecl, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2636 | static CleanupAttr *Create(ASTContext &Ctx, FunctionDecl * FunctionDecl, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2637 | |
| 2638 | // Constructors |
| 2639 | CleanupAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2640 | , FunctionDecl * FunctionDecl |
| 2641 | ); |
| 2642 | |
| 2643 | CleanupAttr *clone(ASTContext &C) const; |
| 2644 | void printPretty(raw_ostream &OS, |
| 2645 | const PrintingPolicy &Policy) const; |
| 2646 | const char *getSpelling() const; |
| 2647 | FunctionDecl * getFunctionDecl() const { |
| 2648 | return functionDecl; |
| 2649 | } |
| 2650 | |
| 2651 | |
| 2652 | |
| 2653 | static bool classof(const Attr *A) { return A->getKind() == attr::Cleanup; } |
| 2654 | }; |
| 2655 | |
| 2656 | class CmseNSCallAttr : public TypeAttr { |
| 2657 | public: |
| 2658 | // Factory methods |
| 2659 | static CmseNSCallAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2660 | static CmseNSCallAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2661 | static CmseNSCallAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2662 | static CmseNSCallAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2663 | |
| 2664 | // Constructors |
| 2665 | CmseNSCallAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2666 | ); |
| 2667 | |
| 2668 | CmseNSCallAttr *clone(ASTContext &C) const; |
| 2669 | void printPretty(raw_ostream &OS, |
| 2670 | const PrintingPolicy &Policy) const; |
| 2671 | const char *getSpelling() const; |
| 2672 | |
| 2673 | |
| 2674 | static bool classof(const Attr *A) { return A->getKind() == attr::CmseNSCall; } |
| 2675 | }; |
| 2676 | |
| 2677 | class CmseNSEntryAttr : public InheritableAttr { |
| 2678 | public: |
| 2679 | // Factory methods |
| 2680 | static CmseNSEntryAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2681 | static CmseNSEntryAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2682 | static CmseNSEntryAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2683 | static CmseNSEntryAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2684 | |
| 2685 | // Constructors |
| 2686 | CmseNSEntryAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2687 | ); |
| 2688 | |
| 2689 | CmseNSEntryAttr *clone(ASTContext &C) const; |
| 2690 | void printPretty(raw_ostream &OS, |
| 2691 | const PrintingPolicy &Policy) const; |
| 2692 | const char *getSpelling() const; |
| 2693 | |
| 2694 | |
| 2695 | static bool classof(const Attr *A) { return A->getKind() == attr::CmseNSEntry; } |
| 2696 | }; |
| 2697 | |
| 2698 | class CodeSegAttr : public InheritableAttr { |
| 2699 | unsigned nameLength; |
| 2700 | char *name; |
| 2701 | |
| 2702 | public: |
| 2703 | // Factory methods |
| 2704 | static CodeSegAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2705 | static CodeSegAttr *Create(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo); |
| 2706 | static CodeSegAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2707 | static CodeSegAttr *Create(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2708 | |
| 2709 | // Constructors |
| 2710 | CodeSegAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2711 | , llvm::StringRef Name |
| 2712 | ); |
| 2713 | |
| 2714 | CodeSegAttr *clone(ASTContext &C) const; |
| 2715 | void printPretty(raw_ostream &OS, |
| 2716 | const PrintingPolicy &Policy) const; |
| 2717 | const char *getSpelling() const; |
| 2718 | llvm::StringRef getName() const { |
| 2719 | return llvm::StringRef(name, nameLength); |
| 2720 | } |
| 2721 | unsigned getNameLength() const { |
| 2722 | return nameLength; |
| 2723 | } |
| 2724 | void setName(ASTContext &C, llvm::StringRef S) { |
| 2725 | nameLength = S.size(); |
| 2726 | this->name = new (C, 1) char [nameLength]; |
| 2727 | if (!S.empty()) |
| 2728 | std::memcpy(this->name, S.data(), nameLength); |
| 2729 | } |
| 2730 | |
| 2731 | |
| 2732 | |
| 2733 | static bool classof(const Attr *A) { return A->getKind() == attr::CodeSeg; } |
| 2734 | }; |
| 2735 | |
| 2736 | class ColdAttr : public InheritableAttr { |
| 2737 | public: |
| 2738 | enum Spelling { |
| 2739 | GNU_cold = 0, |
| 2740 | CXX11_gnu_cold = 1, |
| 2741 | C2x_gnu_cold = 2, |
| 2742 | SpellingNotCalculated = 15 |
| 2743 | |
| 2744 | }; |
| 2745 | |
| 2746 | // Factory methods |
| 2747 | static ColdAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2748 | static ColdAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2749 | static ColdAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2750 | static ColdAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2751 | |
| 2752 | // Constructors |
| 2753 | ColdAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2754 | ); |
| 2755 | |
| 2756 | ColdAttr *clone(ASTContext &C) const; |
| 2757 | void printPretty(raw_ostream &OS, |
| 2758 | const PrintingPolicy &Policy) const; |
| 2759 | const char *getSpelling() const; |
| 2760 | |
| 2761 | |
| 2762 | static bool classof(const Attr *A) { return A->getKind() == attr::Cold; } |
| 2763 | }; |
| 2764 | |
| 2765 | class CommonAttr : public InheritableAttr { |
| 2766 | public: |
| 2767 | enum Spelling { |
| 2768 | GNU_common = 0, |
| 2769 | CXX11_gnu_common = 1, |
| 2770 | C2x_gnu_common = 2, |
| 2771 | SpellingNotCalculated = 15 |
| 2772 | |
| 2773 | }; |
| 2774 | |
| 2775 | // Factory methods |
| 2776 | static CommonAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2777 | static CommonAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2778 | static CommonAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2779 | static CommonAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2780 | |
| 2781 | // Constructors |
| 2782 | CommonAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2783 | ); |
| 2784 | |
| 2785 | CommonAttr *clone(ASTContext &C) const; |
| 2786 | void printPretty(raw_ostream &OS, |
| 2787 | const PrintingPolicy &Policy) const; |
| 2788 | const char *getSpelling() const; |
| 2789 | |
| 2790 | |
| 2791 | static bool classof(const Attr *A) { return A->getKind() == attr::Common; } |
| 2792 | }; |
| 2793 | |
| 2794 | class ConstAttr : public InheritableAttr { |
| 2795 | public: |
| 2796 | enum Spelling { |
| 2797 | GNU_const = 0, |
| 2798 | CXX11_gnu_const = 1, |
| 2799 | C2x_gnu_const = 2, |
| 2800 | SpellingNotCalculated = 15 |
| 2801 | |
| 2802 | }; |
| 2803 | |
| 2804 | // Factory methods |
| 2805 | static ConstAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2806 | static ConstAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2807 | static ConstAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2808 | static ConstAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2809 | |
| 2810 | // Constructors |
| 2811 | ConstAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2812 | ); |
| 2813 | |
| 2814 | ConstAttr *clone(ASTContext &C) const; |
| 2815 | void printPretty(raw_ostream &OS, |
| 2816 | const PrintingPolicy &Policy) const; |
| 2817 | const char *getSpelling() const; |
| 2818 | |
| 2819 | |
| 2820 | static bool classof(const Attr *A) { return A->getKind() == attr::Const; } |
| 2821 | }; |
| 2822 | |
| 2823 | class ConstInitAttr : public InheritableAttr { |
| 2824 | public: |
| 2825 | enum Spelling { |
| 2826 | Keyword_constinit = 0, |
| 2827 | GNU_require_constant_initialization = 1, |
| 2828 | CXX11_clang_require_constant_initialization = 2, |
| 2829 | SpellingNotCalculated = 15 |
| 2830 | |
| 2831 | }; |
| 2832 | |
| 2833 | // Factory methods |
| 2834 | static ConstInitAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2835 | static ConstInitAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2836 | static ConstInitAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, ConstInitAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 2837 | static ConstInitAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, ConstInitAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 2838 | |
| 2839 | // Constructors |
| 2840 | ConstInitAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2841 | ); |
| 2842 | |
| 2843 | ConstInitAttr *clone(ASTContext &C) const; |
| 2844 | void printPretty(raw_ostream &OS, |
| 2845 | const PrintingPolicy &Policy) const; |
| 2846 | const char *getSpelling() const; |
| 2847 | Spelling getSemanticSpelling() const; |
| 2848 | bool isConstinit() const { return getAttributeSpellingListIndex() == 0; } |
| 2849 | |
| 2850 | |
| 2851 | static bool classof(const Attr *A) { return A->getKind() == attr::ConstInit; } |
| 2852 | }; |
| 2853 | |
| 2854 | class ConstructorAttr : public InheritableAttr { |
| 2855 | int priority; |
| 2856 | |
| 2857 | public: |
| 2858 | enum Spelling { |
| 2859 | GNU_constructor = 0, |
| 2860 | CXX11_gnu_constructor = 1, |
| 2861 | C2x_gnu_constructor = 2, |
| 2862 | SpellingNotCalculated = 15 |
| 2863 | |
| 2864 | }; |
| 2865 | |
| 2866 | // Factory methods |
| 2867 | static ConstructorAttr *CreateImplicit(ASTContext &Ctx, int Priority, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2868 | static ConstructorAttr *Create(ASTContext &Ctx, int Priority, const AttributeCommonInfo &CommonInfo); |
| 2869 | static ConstructorAttr *CreateImplicit(ASTContext &Ctx, int Priority, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2870 | static ConstructorAttr *Create(ASTContext &Ctx, int Priority, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2871 | |
| 2872 | // Constructors |
| 2873 | ConstructorAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2874 | , int Priority |
| 2875 | ); |
| 2876 | ConstructorAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2877 | ); |
| 2878 | |
| 2879 | ConstructorAttr *clone(ASTContext &C) const; |
| 2880 | void printPretty(raw_ostream &OS, |
| 2881 | const PrintingPolicy &Policy) const; |
| 2882 | const char *getSpelling() const; |
| 2883 | int getPriority() const { |
| 2884 | return priority; |
| 2885 | } |
| 2886 | |
| 2887 | static const int DefaultPriority = 65535; |
| 2888 | |
| 2889 | |
| 2890 | |
| 2891 | static bool classof(const Attr *A) { return A->getKind() == attr::Constructor; } |
| 2892 | }; |
| 2893 | |
| 2894 | class ConsumableAttr : public InheritableAttr { |
| 2895 | public: |
| 2896 | enum ConsumedState { |
| 2897 | Unknown, |
| 2898 | Consumed, |
| 2899 | Unconsumed |
| 2900 | }; |
| 2901 | private: |
| 2902 | ConsumedState defaultState; |
| 2903 | |
| 2904 | public: |
| 2905 | enum Spelling { |
| 2906 | GNU_consumable = 0, |
| 2907 | CXX11_clang_consumable = 1, |
| 2908 | SpellingNotCalculated = 15 |
| 2909 | |
| 2910 | }; |
| 2911 | |
| 2912 | // Factory methods |
| 2913 | static ConsumableAttr *CreateImplicit(ASTContext &Ctx, ConsumedState DefaultState, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2914 | static ConsumableAttr *Create(ASTContext &Ctx, ConsumedState DefaultState, const AttributeCommonInfo &CommonInfo); |
| 2915 | static ConsumableAttr *CreateImplicit(ASTContext &Ctx, ConsumedState DefaultState, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2916 | static ConsumableAttr *Create(ASTContext &Ctx, ConsumedState DefaultState, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2917 | |
| 2918 | // Constructors |
| 2919 | ConsumableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2920 | , ConsumedState DefaultState |
| 2921 | ); |
| 2922 | |
| 2923 | ConsumableAttr *clone(ASTContext &C) const; |
| 2924 | void printPretty(raw_ostream &OS, |
| 2925 | const PrintingPolicy &Policy) const; |
| 2926 | const char *getSpelling() const; |
| 2927 | ConsumedState getDefaultState() const { |
| 2928 | return defaultState; |
| 2929 | } |
| 2930 | |
| 2931 | static bool ConvertStrToConsumedState(StringRef Val, ConsumedState &Out); |
| 2932 | static const char *ConvertConsumedStateToStr(ConsumedState Val); |
| 2933 | |
| 2934 | |
| 2935 | static bool classof(const Attr *A) { return A->getKind() == attr::Consumable; } |
| 2936 | }; |
| 2937 | |
| 2938 | class ConsumableAutoCastAttr : public InheritableAttr { |
| 2939 | public: |
| 2940 | enum Spelling { |
| 2941 | GNU_consumable_auto_cast_state = 0, |
| 2942 | CXX11_clang_consumable_auto_cast_state = 1, |
| 2943 | SpellingNotCalculated = 15 |
| 2944 | |
| 2945 | }; |
| 2946 | |
| 2947 | // Factory methods |
| 2948 | static ConsumableAutoCastAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2949 | static ConsumableAutoCastAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2950 | static ConsumableAutoCastAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2951 | static ConsumableAutoCastAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2952 | |
| 2953 | // Constructors |
| 2954 | ConsumableAutoCastAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2955 | ); |
| 2956 | |
| 2957 | ConsumableAutoCastAttr *clone(ASTContext &C) const; |
| 2958 | void printPretty(raw_ostream &OS, |
| 2959 | const PrintingPolicy &Policy) const; |
| 2960 | const char *getSpelling() const; |
| 2961 | |
| 2962 | |
| 2963 | static bool classof(const Attr *A) { return A->getKind() == attr::ConsumableAutoCast; } |
| 2964 | }; |
| 2965 | |
| 2966 | class ConsumableSetOnReadAttr : public InheritableAttr { |
| 2967 | public: |
| 2968 | enum Spelling { |
| 2969 | GNU_consumable_set_state_on_read = 0, |
| 2970 | CXX11_clang_consumable_set_state_on_read = 1, |
| 2971 | SpellingNotCalculated = 15 |
| 2972 | |
| 2973 | }; |
| 2974 | |
| 2975 | // Factory methods |
| 2976 | static ConsumableSetOnReadAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 2977 | static ConsumableSetOnReadAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 2978 | static ConsumableSetOnReadAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2979 | static ConsumableSetOnReadAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 2980 | |
| 2981 | // Constructors |
| 2982 | ConsumableSetOnReadAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 2983 | ); |
| 2984 | |
| 2985 | ConsumableSetOnReadAttr *clone(ASTContext &C) const; |
| 2986 | void printPretty(raw_ostream &OS, |
| 2987 | const PrintingPolicy &Policy) const; |
| 2988 | const char *getSpelling() const; |
| 2989 | |
| 2990 | |
| 2991 | static bool classof(const Attr *A) { return A->getKind() == attr::ConsumableSetOnRead; } |
| 2992 | }; |
| 2993 | |
| 2994 | class ConvergentAttr : public InheritableAttr { |
| 2995 | public: |
| 2996 | enum Spelling { |
| 2997 | GNU_convergent = 0, |
| 2998 | CXX11_clang_convergent = 1, |
| 2999 | C2x_clang_convergent = 2, |
| 3000 | SpellingNotCalculated = 15 |
| 3001 | |
| 3002 | }; |
| 3003 | |
| 3004 | // Factory methods |
| 3005 | static ConvergentAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3006 | static ConvergentAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3007 | static ConvergentAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3008 | static ConvergentAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3009 | |
| 3010 | // Constructors |
| 3011 | ConvergentAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3012 | ); |
| 3013 | |
| 3014 | ConvergentAttr *clone(ASTContext &C) const; |
| 3015 | void printPretty(raw_ostream &OS, |
| 3016 | const PrintingPolicy &Policy) const; |
| 3017 | const char *getSpelling() const; |
| 3018 | |
| 3019 | |
| 3020 | static bool classof(const Attr *A) { return A->getKind() == attr::Convergent; } |
| 3021 | }; |
| 3022 | |
| 3023 | class DLLExportAttr : public InheritableAttr { |
| 3024 | public: |
| 3025 | enum Spelling { |
| 3026 | Declspec_dllexport = 0, |
| 3027 | GNU_dllexport = 1, |
| 3028 | CXX11_gnu_dllexport = 2, |
| 3029 | C2x_gnu_dllexport = 3, |
| 3030 | SpellingNotCalculated = 15 |
| 3031 | |
| 3032 | }; |
| 3033 | |
| 3034 | // Factory methods |
| 3035 | static DLLExportAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3036 | static DLLExportAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3037 | static DLLExportAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3038 | static DLLExportAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3039 | |
| 3040 | // Constructors |
| 3041 | DLLExportAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3042 | ); |
| 3043 | |
| 3044 | DLLExportAttr *clone(ASTContext &C) const; |
| 3045 | void printPretty(raw_ostream &OS, |
| 3046 | const PrintingPolicy &Policy) const; |
| 3047 | const char *getSpelling() const; |
| 3048 | |
| 3049 | |
| 3050 | static bool classof(const Attr *A) { return A->getKind() == attr::DLLExport; } |
| 3051 | }; |
| 3052 | |
| 3053 | class DLLExportStaticLocalAttr : public InheritableAttr { |
| 3054 | public: |
| 3055 | // Factory methods |
| 3056 | static DLLExportStaticLocalAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3057 | static DLLExportStaticLocalAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3058 | static DLLExportStaticLocalAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3059 | static DLLExportStaticLocalAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3060 | |
| 3061 | // Constructors |
| 3062 | DLLExportStaticLocalAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3063 | ); |
| 3064 | |
| 3065 | DLLExportStaticLocalAttr *clone(ASTContext &C) const; |
| 3066 | void printPretty(raw_ostream &OS, |
| 3067 | const PrintingPolicy &Policy) const; |
| 3068 | const char *getSpelling() const; |
| 3069 | |
| 3070 | |
| 3071 | static bool classof(const Attr *A) { return A->getKind() == attr::DLLExportStaticLocal; } |
| 3072 | }; |
| 3073 | |
| 3074 | class DLLImportAttr : public InheritableAttr { |
| 3075 | public: |
| 3076 | enum Spelling { |
| 3077 | Declspec_dllimport = 0, |
| 3078 | GNU_dllimport = 1, |
| 3079 | CXX11_gnu_dllimport = 2, |
| 3080 | C2x_gnu_dllimport = 3, |
| 3081 | SpellingNotCalculated = 15 |
| 3082 | |
| 3083 | }; |
| 3084 | |
| 3085 | // Factory methods |
| 3086 | static DLLImportAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3087 | static DLLImportAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3088 | static DLLImportAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3089 | static DLLImportAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3090 | |
| 3091 | // Constructors |
| 3092 | DLLImportAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3093 | ); |
| 3094 | |
| 3095 | DLLImportAttr *clone(ASTContext &C) const; |
| 3096 | void printPretty(raw_ostream &OS, |
| 3097 | const PrintingPolicy &Policy) const; |
| 3098 | const char *getSpelling() const; |
| 3099 | |
| 3100 | private: |
| 3101 | bool PropagatedToBaseTemplate = false; |
| 3102 | |
| 3103 | public: |
| 3104 | void setPropagatedToBaseTemplate() { PropagatedToBaseTemplate = true; } |
| 3105 | bool wasPropagatedToBaseTemplate() { return PropagatedToBaseTemplate; } |
| 3106 | |
| 3107 | |
| 3108 | static bool classof(const Attr *A) { return A->getKind() == attr::DLLImport; } |
| 3109 | }; |
| 3110 | |
| 3111 | class DLLImportStaticLocalAttr : public InheritableAttr { |
| 3112 | public: |
| 3113 | // Factory methods |
| 3114 | static DLLImportStaticLocalAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3115 | static DLLImportStaticLocalAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3116 | static DLLImportStaticLocalAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3117 | static DLLImportStaticLocalAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3118 | |
| 3119 | // Constructors |
| 3120 | DLLImportStaticLocalAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3121 | ); |
| 3122 | |
| 3123 | DLLImportStaticLocalAttr *clone(ASTContext &C) const; |
| 3124 | void printPretty(raw_ostream &OS, |
| 3125 | const PrintingPolicy &Policy) const; |
| 3126 | const char *getSpelling() const; |
| 3127 | |
| 3128 | |
| 3129 | static bool classof(const Attr *A) { return A->getKind() == attr::DLLImportStaticLocal; } |
| 3130 | }; |
| 3131 | |
| 3132 | class DeprecatedAttr : public InheritableAttr { |
| 3133 | unsigned messageLength; |
| 3134 | char *message; |
| 3135 | |
| 3136 | unsigned replacementLength; |
| 3137 | char *replacement; |
| 3138 | |
| 3139 | public: |
| 3140 | enum Spelling { |
| 3141 | GNU_deprecated = 0, |
| 3142 | CXX11_gnu_deprecated = 1, |
| 3143 | C2x_gnu_deprecated = 2, |
| 3144 | Declspec_deprecated = 3, |
| 3145 | CXX11_deprecated = 4, |
| 3146 | C2x_deprecated = 5, |
| 3147 | SpellingNotCalculated = 15 |
| 3148 | |
| 3149 | }; |
| 3150 | |
| 3151 | // Factory methods |
| 3152 | static DeprecatedAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Message, llvm::StringRef Replacement, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3153 | static DeprecatedAttr *Create(ASTContext &Ctx, llvm::StringRef Message, llvm::StringRef Replacement, const AttributeCommonInfo &CommonInfo); |
| 3154 | static DeprecatedAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Message, llvm::StringRef Replacement, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3155 | static DeprecatedAttr *Create(ASTContext &Ctx, llvm::StringRef Message, llvm::StringRef Replacement, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3156 | |
| 3157 | // Constructors |
| 3158 | DeprecatedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3159 | , llvm::StringRef Message |
| 3160 | , llvm::StringRef Replacement |
| 3161 | ); |
| 3162 | DeprecatedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3163 | ); |
| 3164 | |
| 3165 | DeprecatedAttr *clone(ASTContext &C) const; |
| 3166 | void printPretty(raw_ostream &OS, |
| 3167 | const PrintingPolicy &Policy) const; |
| 3168 | const char *getSpelling() const; |
| 3169 | llvm::StringRef getMessage() const { |
| 3170 | return llvm::StringRef(message, messageLength); |
| 3171 | } |
| 3172 | unsigned getMessageLength() const { |
| 3173 | return messageLength; |
| 3174 | } |
| 3175 | void setMessage(ASTContext &C, llvm::StringRef S) { |
| 3176 | messageLength = S.size(); |
| 3177 | this->message = new (C, 1) char [messageLength]; |
| 3178 | if (!S.empty()) |
| 3179 | std::memcpy(this->message, S.data(), messageLength); |
| 3180 | } |
| 3181 | |
| 3182 | llvm::StringRef getReplacement() const { |
| 3183 | return llvm::StringRef(replacement, replacementLength); |
| 3184 | } |
| 3185 | unsigned getReplacementLength() const { |
| 3186 | return replacementLength; |
| 3187 | } |
| 3188 | void setReplacement(ASTContext &C, llvm::StringRef S) { |
| 3189 | replacementLength = S.size(); |
| 3190 | this->replacement = new (C, 1) char [replacementLength]; |
| 3191 | if (!S.empty()) |
| 3192 | std::memcpy(this->replacement, S.data(), replacementLength); |
| 3193 | } |
| 3194 | |
| 3195 | |
| 3196 | |
| 3197 | static bool classof(const Attr *A) { return A->getKind() == attr::Deprecated; } |
| 3198 | }; |
| 3199 | |
| 3200 | class DestructorAttr : public InheritableAttr { |
| 3201 | int priority; |
| 3202 | |
| 3203 | public: |
| 3204 | enum Spelling { |
| 3205 | GNU_destructor = 0, |
| 3206 | CXX11_gnu_destructor = 1, |
| 3207 | C2x_gnu_destructor = 2, |
| 3208 | SpellingNotCalculated = 15 |
| 3209 | |
| 3210 | }; |
| 3211 | |
| 3212 | // Factory methods |
| 3213 | static DestructorAttr *CreateImplicit(ASTContext &Ctx, int Priority, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3214 | static DestructorAttr *Create(ASTContext &Ctx, int Priority, const AttributeCommonInfo &CommonInfo); |
| 3215 | static DestructorAttr *CreateImplicit(ASTContext &Ctx, int Priority, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3216 | static DestructorAttr *Create(ASTContext &Ctx, int Priority, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3217 | |
| 3218 | // Constructors |
| 3219 | DestructorAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3220 | , int Priority |
| 3221 | ); |
| 3222 | DestructorAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3223 | ); |
| 3224 | |
| 3225 | DestructorAttr *clone(ASTContext &C) const; |
| 3226 | void printPretty(raw_ostream &OS, |
| 3227 | const PrintingPolicy &Policy) const; |
| 3228 | const char *getSpelling() const; |
| 3229 | int getPriority() const { |
| 3230 | return priority; |
| 3231 | } |
| 3232 | |
| 3233 | static const int DefaultPriority = 65535; |
| 3234 | |
| 3235 | |
| 3236 | |
| 3237 | static bool classof(const Attr *A) { return A->getKind() == attr::Destructor; } |
| 3238 | }; |
| 3239 | |
| 3240 | class DiagnoseIfAttr : public InheritableAttr { |
| 3241 | Expr * cond; |
| 3242 | |
| 3243 | unsigned messageLength; |
| 3244 | char *message; |
| 3245 | |
| 3246 | public: |
| 3247 | enum DiagnosticType { |
| 3248 | DT_Error, |
| 3249 | DT_Warning |
| 3250 | }; |
| 3251 | private: |
| 3252 | DiagnosticType diagnosticType; |
| 3253 | |
| 3254 | bool argDependent; |
| 3255 | |
| 3256 | NamedDecl * parent; |
| 3257 | |
| 3258 | public: |
| 3259 | // Factory methods |
| 3260 | static DiagnoseIfAttr *CreateImplicit(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, bool ArgDependent, NamedDecl * Parent, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3261 | static DiagnoseIfAttr *Create(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, bool ArgDependent, NamedDecl * Parent, const AttributeCommonInfo &CommonInfo); |
| 3262 | static DiagnoseIfAttr *CreateImplicit(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, bool ArgDependent, NamedDecl * Parent, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3263 | static DiagnoseIfAttr *Create(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, bool ArgDependent, NamedDecl * Parent, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3264 | static DiagnoseIfAttr *CreateImplicit(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3265 | static DiagnoseIfAttr *Create(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, const AttributeCommonInfo &CommonInfo); |
| 3266 | static DiagnoseIfAttr *CreateImplicit(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3267 | static DiagnoseIfAttr *Create(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, DiagnosticType DiagnosticType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3268 | |
| 3269 | // Constructors |
| 3270 | DiagnoseIfAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3271 | , Expr * Cond |
| 3272 | , llvm::StringRef Message |
| 3273 | , DiagnosticType DiagnosticType |
| 3274 | , bool ArgDependent |
| 3275 | , NamedDecl * Parent |
| 3276 | ); |
| 3277 | DiagnoseIfAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3278 | , Expr * Cond |
| 3279 | , llvm::StringRef Message |
| 3280 | , DiagnosticType DiagnosticType |
| 3281 | ); |
| 3282 | |
| 3283 | DiagnoseIfAttr *clone(ASTContext &C) const; |
| 3284 | void printPretty(raw_ostream &OS, |
| 3285 | const PrintingPolicy &Policy) const; |
| 3286 | const char *getSpelling() const; |
| 3287 | Expr * getCond() const { |
| 3288 | return cond; |
| 3289 | } |
| 3290 | |
| 3291 | llvm::StringRef getMessage() const { |
| 3292 | return llvm::StringRef(message, messageLength); |
| 3293 | } |
| 3294 | unsigned getMessageLength() const { |
| 3295 | return messageLength; |
| 3296 | } |
| 3297 | void setMessage(ASTContext &C, llvm::StringRef S) { |
| 3298 | messageLength = S.size(); |
| 3299 | this->message = new (C, 1) char [messageLength]; |
| 3300 | if (!S.empty()) |
| 3301 | std::memcpy(this->message, S.data(), messageLength); |
| 3302 | } |
| 3303 | |
| 3304 | DiagnosticType getDiagnosticType() const { |
| 3305 | return diagnosticType; |
| 3306 | } |
| 3307 | |
| 3308 | static bool ConvertStrToDiagnosticType(StringRef Val, DiagnosticType &Out); |
| 3309 | static const char *ConvertDiagnosticTypeToStr(DiagnosticType Val); |
| 3310 | bool getArgDependent() const { |
| 3311 | return argDependent; |
| 3312 | } |
| 3313 | |
| 3314 | NamedDecl * getParent() const { |
| 3315 | return parent; |
| 3316 | } |
| 3317 | |
| 3318 | |
| 3319 | bool isError() const { return diagnosticType == DT_Error; } |
| 3320 | bool isWarning() const { return diagnosticType == DT_Warning; } |
| 3321 | |
| 3322 | |
| 3323 | static bool classof(const Attr *A) { return A->getKind() == attr::DiagnoseIf; } |
| 3324 | }; |
| 3325 | |
| 3326 | class DisableTailCallsAttr : public InheritableAttr { |
| 3327 | public: |
| 3328 | enum Spelling { |
| 3329 | GNU_disable_tail_calls = 0, |
| 3330 | CXX11_clang_disable_tail_calls = 1, |
| 3331 | C2x_clang_disable_tail_calls = 2, |
| 3332 | SpellingNotCalculated = 15 |
| 3333 | |
| 3334 | }; |
| 3335 | |
| 3336 | // Factory methods |
| 3337 | static DisableTailCallsAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3338 | static DisableTailCallsAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3339 | static DisableTailCallsAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3340 | static DisableTailCallsAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3341 | |
| 3342 | // Constructors |
| 3343 | DisableTailCallsAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3344 | ); |
| 3345 | |
| 3346 | DisableTailCallsAttr *clone(ASTContext &C) const; |
| 3347 | void printPretty(raw_ostream &OS, |
| 3348 | const PrintingPolicy &Policy) const; |
| 3349 | const char *getSpelling() const; |
| 3350 | |
| 3351 | |
| 3352 | static bool classof(const Attr *A) { return A->getKind() == attr::DisableTailCalls; } |
| 3353 | }; |
| 3354 | |
| 3355 | class EmptyBasesAttr : public InheritableAttr { |
| 3356 | public: |
| 3357 | // Factory methods |
| 3358 | static EmptyBasesAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3359 | static EmptyBasesAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3360 | static EmptyBasesAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3361 | static EmptyBasesAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3362 | |
| 3363 | // Constructors |
| 3364 | EmptyBasesAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3365 | ); |
| 3366 | |
| 3367 | EmptyBasesAttr *clone(ASTContext &C) const; |
| 3368 | void printPretty(raw_ostream &OS, |
| 3369 | const PrintingPolicy &Policy) const; |
| 3370 | const char *getSpelling() const; |
| 3371 | |
| 3372 | |
| 3373 | static bool classof(const Attr *A) { return A->getKind() == attr::EmptyBases; } |
| 3374 | }; |
| 3375 | |
| 3376 | class EnableIfAttr : public InheritableAttr { |
| 3377 | Expr * cond; |
| 3378 | |
| 3379 | unsigned messageLength; |
| 3380 | char *message; |
| 3381 | |
| 3382 | public: |
| 3383 | // Factory methods |
| 3384 | static EnableIfAttr *CreateImplicit(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3385 | static EnableIfAttr *Create(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, const AttributeCommonInfo &CommonInfo); |
| 3386 | static EnableIfAttr *CreateImplicit(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3387 | static EnableIfAttr *Create(ASTContext &Ctx, Expr * Cond, llvm::StringRef Message, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3388 | |
| 3389 | // Constructors |
| 3390 | EnableIfAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3391 | , Expr * Cond |
| 3392 | , llvm::StringRef Message |
| 3393 | ); |
| 3394 | |
| 3395 | EnableIfAttr *clone(ASTContext &C) const; |
| 3396 | void printPretty(raw_ostream &OS, |
| 3397 | const PrintingPolicy &Policy) const; |
| 3398 | const char *getSpelling() const; |
| 3399 | Expr * getCond() const { |
| 3400 | return cond; |
| 3401 | } |
| 3402 | |
| 3403 | llvm::StringRef getMessage() const { |
| 3404 | return llvm::StringRef(message, messageLength); |
| 3405 | } |
| 3406 | unsigned getMessageLength() const { |
| 3407 | return messageLength; |
| 3408 | } |
| 3409 | void setMessage(ASTContext &C, llvm::StringRef S) { |
| 3410 | messageLength = S.size(); |
| 3411 | this->message = new (C, 1) char [messageLength]; |
| 3412 | if (!S.empty()) |
| 3413 | std::memcpy(this->message, S.data(), messageLength); |
| 3414 | } |
| 3415 | |
| 3416 | |
| 3417 | |
| 3418 | static bool classof(const Attr *A) { return A->getKind() == attr::EnableIf; } |
| 3419 | }; |
| 3420 | |
| 3421 | class EnforceTCBAttr : public InheritableAttr { |
| 3422 | unsigned tCBNameLength; |
| 3423 | char *tCBName; |
| 3424 | |
| 3425 | public: |
| 3426 | enum Spelling { |
| 3427 | GNU_enforce_tcb = 0, |
| 3428 | CXX11_clang_enforce_tcb = 1, |
| 3429 | C2x_clang_enforce_tcb = 2, |
| 3430 | SpellingNotCalculated = 15 |
| 3431 | |
| 3432 | }; |
| 3433 | |
| 3434 | // Factory methods |
| 3435 | static EnforceTCBAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef TCBName, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3436 | static EnforceTCBAttr *Create(ASTContext &Ctx, llvm::StringRef TCBName, const AttributeCommonInfo &CommonInfo); |
| 3437 | static EnforceTCBAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef TCBName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3438 | static EnforceTCBAttr *Create(ASTContext &Ctx, llvm::StringRef TCBName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3439 | |
| 3440 | // Constructors |
| 3441 | EnforceTCBAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3442 | , llvm::StringRef TCBName |
| 3443 | ); |
| 3444 | |
| 3445 | EnforceTCBAttr *clone(ASTContext &C) const; |
| 3446 | void printPretty(raw_ostream &OS, |
| 3447 | const PrintingPolicy &Policy) const; |
| 3448 | const char *getSpelling() const; |
| 3449 | llvm::StringRef getTCBName() const { |
| 3450 | return llvm::StringRef(tCBName, tCBNameLength); |
| 3451 | } |
| 3452 | unsigned getTCBNameLength() const { |
| 3453 | return tCBNameLength; |
| 3454 | } |
| 3455 | void setTCBName(ASTContext &C, llvm::StringRef S) { |
| 3456 | tCBNameLength = S.size(); |
| 3457 | this->tCBName = new (C, 1) char [tCBNameLength]; |
| 3458 | if (!S.empty()) |
| 3459 | std::memcpy(this->tCBName, S.data(), tCBNameLength); |
| 3460 | } |
| 3461 | |
| 3462 | |
| 3463 | |
| 3464 | static bool classof(const Attr *A) { return A->getKind() == attr::EnforceTCB; } |
| 3465 | }; |
| 3466 | |
| 3467 | class EnforceTCBLeafAttr : public InheritableAttr { |
| 3468 | unsigned tCBNameLength; |
| 3469 | char *tCBName; |
| 3470 | |
| 3471 | public: |
| 3472 | enum Spelling { |
| 3473 | GNU_enforce_tcb_leaf = 0, |
| 3474 | CXX11_clang_enforce_tcb_leaf = 1, |
| 3475 | C2x_clang_enforce_tcb_leaf = 2, |
| 3476 | SpellingNotCalculated = 15 |
| 3477 | |
| 3478 | }; |
| 3479 | |
| 3480 | // Factory methods |
| 3481 | static EnforceTCBLeafAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef TCBName, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3482 | static EnforceTCBLeafAttr *Create(ASTContext &Ctx, llvm::StringRef TCBName, const AttributeCommonInfo &CommonInfo); |
| 3483 | static EnforceTCBLeafAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef TCBName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3484 | static EnforceTCBLeafAttr *Create(ASTContext &Ctx, llvm::StringRef TCBName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3485 | |
| 3486 | // Constructors |
| 3487 | EnforceTCBLeafAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3488 | , llvm::StringRef TCBName |
| 3489 | ); |
| 3490 | |
| 3491 | EnforceTCBLeafAttr *clone(ASTContext &C) const; |
| 3492 | void printPretty(raw_ostream &OS, |
| 3493 | const PrintingPolicy &Policy) const; |
| 3494 | const char *getSpelling() const; |
| 3495 | llvm::StringRef getTCBName() const { |
| 3496 | return llvm::StringRef(tCBName, tCBNameLength); |
| 3497 | } |
| 3498 | unsigned getTCBNameLength() const { |
| 3499 | return tCBNameLength; |
| 3500 | } |
| 3501 | void setTCBName(ASTContext &C, llvm::StringRef S) { |
| 3502 | tCBNameLength = S.size(); |
| 3503 | this->tCBName = new (C, 1) char [tCBNameLength]; |
| 3504 | if (!S.empty()) |
| 3505 | std::memcpy(this->tCBName, S.data(), tCBNameLength); |
| 3506 | } |
| 3507 | |
| 3508 | |
| 3509 | |
| 3510 | static bool classof(const Attr *A) { return A->getKind() == attr::EnforceTCBLeaf; } |
| 3511 | }; |
| 3512 | |
| 3513 | class EnumExtensibilityAttr : public InheritableAttr { |
| 3514 | public: |
| 3515 | enum Kind { |
| 3516 | Closed, |
| 3517 | Open |
| 3518 | }; |
| 3519 | private: |
| 3520 | Kind extensibility; |
| 3521 | |
| 3522 | public: |
| 3523 | enum Spelling { |
| 3524 | GNU_enum_extensibility = 0, |
| 3525 | CXX11_clang_enum_extensibility = 1, |
| 3526 | C2x_clang_enum_extensibility = 2, |
| 3527 | SpellingNotCalculated = 15 |
| 3528 | |
| 3529 | }; |
| 3530 | |
| 3531 | // Factory methods |
| 3532 | static EnumExtensibilityAttr *CreateImplicit(ASTContext &Ctx, Kind Extensibility, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3533 | static EnumExtensibilityAttr *Create(ASTContext &Ctx, Kind Extensibility, const AttributeCommonInfo &CommonInfo); |
| 3534 | static EnumExtensibilityAttr *CreateImplicit(ASTContext &Ctx, Kind Extensibility, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3535 | static EnumExtensibilityAttr *Create(ASTContext &Ctx, Kind Extensibility, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3536 | |
| 3537 | // Constructors |
| 3538 | EnumExtensibilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3539 | , Kind Extensibility |
| 3540 | ); |
| 3541 | |
| 3542 | EnumExtensibilityAttr *clone(ASTContext &C) const; |
| 3543 | void printPretty(raw_ostream &OS, |
| 3544 | const PrintingPolicy &Policy) const; |
| 3545 | const char *getSpelling() const; |
| 3546 | Kind getExtensibility() const { |
| 3547 | return extensibility; |
| 3548 | } |
| 3549 | |
| 3550 | static bool ConvertStrToKind(StringRef Val, Kind &Out); |
| 3551 | static const char *ConvertKindToStr(Kind Val); |
| 3552 | |
| 3553 | |
| 3554 | static bool classof(const Attr *A) { return A->getKind() == attr::EnumExtensibility; } |
| 3555 | }; |
| 3556 | |
| 3557 | class ExcludeFromExplicitInstantiationAttr : public InheritableAttr { |
| 3558 | public: |
| 3559 | enum Spelling { |
| 3560 | GNU_exclude_from_explicit_instantiation = 0, |
| 3561 | CXX11_clang_exclude_from_explicit_instantiation = 1, |
| 3562 | C2x_clang_exclude_from_explicit_instantiation = 2, |
| 3563 | SpellingNotCalculated = 15 |
| 3564 | |
| 3565 | }; |
| 3566 | |
| 3567 | // Factory methods |
| 3568 | static ExcludeFromExplicitInstantiationAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3569 | static ExcludeFromExplicitInstantiationAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3570 | static ExcludeFromExplicitInstantiationAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3571 | static ExcludeFromExplicitInstantiationAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3572 | |
| 3573 | // Constructors |
| 3574 | ExcludeFromExplicitInstantiationAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3575 | ); |
| 3576 | |
| 3577 | ExcludeFromExplicitInstantiationAttr *clone(ASTContext &C) const; |
| 3578 | void printPretty(raw_ostream &OS, |
| 3579 | const PrintingPolicy &Policy) const; |
| 3580 | const char *getSpelling() const; |
| 3581 | |
| 3582 | |
| 3583 | static bool classof(const Attr *A) { return A->getKind() == attr::ExcludeFromExplicitInstantiation; } |
| 3584 | }; |
| 3585 | |
| 3586 | class ExclusiveTrylockFunctionAttr : public InheritableAttr { |
| 3587 | Expr * successValue; |
| 3588 | |
| 3589 | unsigned args_Size; |
| 3590 | Expr * *args_; |
| 3591 | |
| 3592 | public: |
| 3593 | // Factory methods |
| 3594 | static ExclusiveTrylockFunctionAttr *CreateImplicit(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3595 | static ExclusiveTrylockFunctionAttr *Create(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 3596 | static ExclusiveTrylockFunctionAttr *CreateImplicit(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3597 | static ExclusiveTrylockFunctionAttr *Create(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3598 | |
| 3599 | // Constructors |
| 3600 | ExclusiveTrylockFunctionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3601 | , Expr * SuccessValue |
| 3602 | , Expr * *Args, unsigned ArgsSize |
| 3603 | ); |
| 3604 | ExclusiveTrylockFunctionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3605 | , Expr * SuccessValue |
| 3606 | ); |
| 3607 | |
| 3608 | ExclusiveTrylockFunctionAttr *clone(ASTContext &C) const; |
| 3609 | void printPretty(raw_ostream &OS, |
| 3610 | const PrintingPolicy &Policy) const; |
| 3611 | const char *getSpelling() const; |
| 3612 | Expr * getSuccessValue() const { |
| 3613 | return successValue; |
| 3614 | } |
| 3615 | |
| 3616 | typedef Expr ** args_iterator; |
| 3617 | args_iterator args_begin() const { return args_; } |
| 3618 | args_iterator args_end() const { return args_ + args_Size; } |
| 3619 | unsigned args_size() const { return args_Size; } |
| 3620 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 3621 | |
| 3622 | |
| 3623 | |
| 3624 | |
| 3625 | static bool classof(const Attr *A) { return A->getKind() == attr::ExclusiveTrylockFunction; } |
| 3626 | }; |
| 3627 | |
| 3628 | class ExternalSourceSymbolAttr : public InheritableAttr { |
| 3629 | unsigned languageLength; |
| 3630 | char *language; |
| 3631 | |
| 3632 | unsigned definedInLength; |
| 3633 | char *definedIn; |
| 3634 | |
| 3635 | bool generatedDeclaration; |
| 3636 | |
| 3637 | public: |
| 3638 | enum Spelling { |
| 3639 | GNU_external_source_symbol = 0, |
| 3640 | CXX11_clang_external_source_symbol = 1, |
| 3641 | C2x_clang_external_source_symbol = 2, |
| 3642 | SpellingNotCalculated = 15 |
| 3643 | |
| 3644 | }; |
| 3645 | |
| 3646 | // Factory methods |
| 3647 | static ExternalSourceSymbolAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Language, llvm::StringRef DefinedIn, bool GeneratedDeclaration, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3648 | static ExternalSourceSymbolAttr *Create(ASTContext &Ctx, llvm::StringRef Language, llvm::StringRef DefinedIn, bool GeneratedDeclaration, const AttributeCommonInfo &CommonInfo); |
| 3649 | static ExternalSourceSymbolAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Language, llvm::StringRef DefinedIn, bool GeneratedDeclaration, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3650 | static ExternalSourceSymbolAttr *Create(ASTContext &Ctx, llvm::StringRef Language, llvm::StringRef DefinedIn, bool GeneratedDeclaration, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3651 | |
| 3652 | // Constructors |
| 3653 | ExternalSourceSymbolAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3654 | , llvm::StringRef Language |
| 3655 | , llvm::StringRef DefinedIn |
| 3656 | , bool GeneratedDeclaration |
| 3657 | ); |
| 3658 | ExternalSourceSymbolAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3659 | ); |
| 3660 | |
| 3661 | ExternalSourceSymbolAttr *clone(ASTContext &C) const; |
| 3662 | void printPretty(raw_ostream &OS, |
| 3663 | const PrintingPolicy &Policy) const; |
| 3664 | const char *getSpelling() const; |
| 3665 | llvm::StringRef getLanguage() const { |
| 3666 | return llvm::StringRef(language, languageLength); |
| 3667 | } |
| 3668 | unsigned getLanguageLength() const { |
| 3669 | return languageLength; |
| 3670 | } |
| 3671 | void setLanguage(ASTContext &C, llvm::StringRef S) { |
| 3672 | languageLength = S.size(); |
| 3673 | this->language = new (C, 1) char [languageLength]; |
| 3674 | if (!S.empty()) |
| 3675 | std::memcpy(this->language, S.data(), languageLength); |
| 3676 | } |
| 3677 | |
| 3678 | llvm::StringRef getDefinedIn() const { |
| 3679 | return llvm::StringRef(definedIn, definedInLength); |
| 3680 | } |
| 3681 | unsigned getDefinedInLength() const { |
| 3682 | return definedInLength; |
| 3683 | } |
| 3684 | void setDefinedIn(ASTContext &C, llvm::StringRef S) { |
| 3685 | definedInLength = S.size(); |
| 3686 | this->definedIn = new (C, 1) char [definedInLength]; |
| 3687 | if (!S.empty()) |
| 3688 | std::memcpy(this->definedIn, S.data(), definedInLength); |
| 3689 | } |
| 3690 | |
| 3691 | bool getGeneratedDeclaration() const { |
| 3692 | return generatedDeclaration; |
| 3693 | } |
| 3694 | |
| 3695 | |
| 3696 | |
| 3697 | static bool classof(const Attr *A) { return A->getKind() == attr::ExternalSourceSymbol; } |
| 3698 | }; |
| 3699 | |
| 3700 | class FallThroughAttr : public StmtAttr { |
| 3701 | public: |
| 3702 | enum Spelling { |
| 3703 | CXX11_fallthrough = 0, |
| 3704 | C2x_fallthrough = 1, |
| 3705 | CXX11_clang_fallthrough = 2, |
| 3706 | GNU_fallthrough = 3, |
| 3707 | CXX11_gnu_fallthrough = 4, |
| 3708 | C2x_gnu_fallthrough = 5, |
| 3709 | SpellingNotCalculated = 15 |
| 3710 | |
| 3711 | }; |
| 3712 | |
| 3713 | // Factory methods |
| 3714 | static FallThroughAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3715 | static FallThroughAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3716 | static FallThroughAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3717 | static FallThroughAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3718 | |
| 3719 | // Constructors |
| 3720 | FallThroughAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3721 | ); |
| 3722 | |
| 3723 | FallThroughAttr *clone(ASTContext &C) const; |
| 3724 | void printPretty(raw_ostream &OS, |
| 3725 | const PrintingPolicy &Policy) const; |
| 3726 | const char *getSpelling() const; |
| 3727 | |
| 3728 | |
| 3729 | static bool classof(const Attr *A) { return A->getKind() == attr::FallThrough; } |
| 3730 | }; |
| 3731 | |
| 3732 | class FastCallAttr : public InheritableAttr { |
| 3733 | public: |
| 3734 | enum Spelling { |
| 3735 | GNU_fastcall = 0, |
| 3736 | CXX11_gnu_fastcall = 1, |
| 3737 | C2x_gnu_fastcall = 2, |
| 3738 | Keyword_fastcall = 3, |
| 3739 | SpellingNotCalculated = 15 |
| 3740 | |
| 3741 | }; |
| 3742 | |
| 3743 | // Factory methods |
| 3744 | static FastCallAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3745 | static FastCallAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3746 | static FastCallAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3747 | static FastCallAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3748 | |
| 3749 | // Constructors |
| 3750 | FastCallAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3751 | ); |
| 3752 | |
| 3753 | FastCallAttr *clone(ASTContext &C) const; |
| 3754 | void printPretty(raw_ostream &OS, |
| 3755 | const PrintingPolicy &Policy) const; |
| 3756 | const char *getSpelling() const; |
| 3757 | |
| 3758 | |
| 3759 | static bool classof(const Attr *A) { return A->getKind() == attr::FastCall; } |
| 3760 | }; |
| 3761 | |
| 3762 | class FinalAttr : public InheritableAttr { |
| 3763 | public: |
| 3764 | enum Spelling { |
| 3765 | Keyword_final = 0, |
| 3766 | Keyword_sealed = 1, |
| 3767 | SpellingNotCalculated = 15 |
| 3768 | |
| 3769 | }; |
| 3770 | |
| 3771 | // Factory methods |
| 3772 | static FinalAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3773 | static FinalAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3774 | static FinalAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, FinalAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 3775 | static FinalAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, FinalAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 3776 | |
| 3777 | // Constructors |
| 3778 | FinalAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3779 | ); |
| 3780 | |
| 3781 | FinalAttr *clone(ASTContext &C) const; |
| 3782 | void printPretty(raw_ostream &OS, |
| 3783 | const PrintingPolicy &Policy) const; |
| 3784 | const char *getSpelling() const; |
| 3785 | Spelling getSemanticSpelling() const; |
| 3786 | bool isSpelledAsSealed() const { return getAttributeSpellingListIndex() == 1; } |
| 3787 | |
| 3788 | |
| 3789 | static bool classof(const Attr *A) { return A->getKind() == attr::Final; } |
| 3790 | }; |
| 3791 | |
| 3792 | class FlagEnumAttr : public InheritableAttr { |
| 3793 | public: |
| 3794 | enum Spelling { |
| 3795 | GNU_flag_enum = 0, |
| 3796 | CXX11_clang_flag_enum = 1, |
| 3797 | C2x_clang_flag_enum = 2, |
| 3798 | SpellingNotCalculated = 15 |
| 3799 | |
| 3800 | }; |
| 3801 | |
| 3802 | // Factory methods |
| 3803 | static FlagEnumAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3804 | static FlagEnumAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3805 | static FlagEnumAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3806 | static FlagEnumAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3807 | |
| 3808 | // Constructors |
| 3809 | FlagEnumAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3810 | ); |
| 3811 | |
| 3812 | FlagEnumAttr *clone(ASTContext &C) const; |
| 3813 | void printPretty(raw_ostream &OS, |
| 3814 | const PrintingPolicy &Policy) const; |
| 3815 | const char *getSpelling() const; |
| 3816 | |
| 3817 | |
| 3818 | static bool classof(const Attr *A) { return A->getKind() == attr::FlagEnum; } |
| 3819 | }; |
| 3820 | |
| 3821 | class FlattenAttr : public InheritableAttr { |
| 3822 | public: |
| 3823 | enum Spelling { |
| 3824 | GNU_flatten = 0, |
| 3825 | CXX11_gnu_flatten = 1, |
| 3826 | C2x_gnu_flatten = 2, |
| 3827 | SpellingNotCalculated = 15 |
| 3828 | |
| 3829 | }; |
| 3830 | |
| 3831 | // Factory methods |
| 3832 | static FlattenAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3833 | static FlattenAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3834 | static FlattenAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3835 | static FlattenAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3836 | |
| 3837 | // Constructors |
| 3838 | FlattenAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3839 | ); |
| 3840 | |
| 3841 | FlattenAttr *clone(ASTContext &C) const; |
| 3842 | void printPretty(raw_ostream &OS, |
| 3843 | const PrintingPolicy &Policy) const; |
| 3844 | const char *getSpelling() const; |
| 3845 | |
| 3846 | |
| 3847 | static bool classof(const Attr *A) { return A->getKind() == attr::Flatten; } |
| 3848 | }; |
| 3849 | |
| 3850 | class FormatAttr : public InheritableAttr { |
| 3851 | IdentifierInfo * type; |
| 3852 | |
| 3853 | int formatIdx; |
| 3854 | |
| 3855 | int firstArg; |
| 3856 | |
| 3857 | public: |
| 3858 | enum Spelling { |
| 3859 | GNU_format = 0, |
| 3860 | CXX11_gnu_format = 1, |
| 3861 | C2x_gnu_format = 2, |
| 3862 | SpellingNotCalculated = 15 |
| 3863 | |
| 3864 | }; |
| 3865 | |
| 3866 | // Factory methods |
| 3867 | static FormatAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Type, int FormatIdx, int FirstArg, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3868 | static FormatAttr *Create(ASTContext &Ctx, IdentifierInfo * Type, int FormatIdx, int FirstArg, const AttributeCommonInfo &CommonInfo); |
| 3869 | static FormatAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Type, int FormatIdx, int FirstArg, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3870 | static FormatAttr *Create(ASTContext &Ctx, IdentifierInfo * Type, int FormatIdx, int FirstArg, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3871 | |
| 3872 | // Constructors |
| 3873 | FormatAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3874 | , IdentifierInfo * Type |
| 3875 | , int FormatIdx |
| 3876 | , int FirstArg |
| 3877 | ); |
| 3878 | |
| 3879 | FormatAttr *clone(ASTContext &C) const; |
| 3880 | void printPretty(raw_ostream &OS, |
| 3881 | const PrintingPolicy &Policy) const; |
| 3882 | const char *getSpelling() const; |
| 3883 | IdentifierInfo * getType() const { |
| 3884 | return type; |
| 3885 | } |
| 3886 | |
| 3887 | int getFormatIdx() const { |
| 3888 | return formatIdx; |
| 3889 | } |
| 3890 | |
| 3891 | int getFirstArg() const { |
| 3892 | return firstArg; |
| 3893 | } |
| 3894 | |
| 3895 | |
| 3896 | |
| 3897 | static bool classof(const Attr *A) { return A->getKind() == attr::Format; } |
| 3898 | }; |
| 3899 | |
| 3900 | class FormatArgAttr : public InheritableAttr { |
| 3901 | ParamIdx formatIdx; |
| 3902 | |
| 3903 | public: |
| 3904 | enum Spelling { |
| 3905 | GNU_format_arg = 0, |
| 3906 | CXX11_gnu_format_arg = 1, |
| 3907 | C2x_gnu_format_arg = 2, |
| 3908 | SpellingNotCalculated = 15 |
| 3909 | |
| 3910 | }; |
| 3911 | |
| 3912 | // Factory methods |
| 3913 | static FormatArgAttr *CreateImplicit(ASTContext &Ctx, ParamIdx FormatIdx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3914 | static FormatArgAttr *Create(ASTContext &Ctx, ParamIdx FormatIdx, const AttributeCommonInfo &CommonInfo); |
| 3915 | static FormatArgAttr *CreateImplicit(ASTContext &Ctx, ParamIdx FormatIdx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3916 | static FormatArgAttr *Create(ASTContext &Ctx, ParamIdx FormatIdx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3917 | |
| 3918 | // Constructors |
| 3919 | FormatArgAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3920 | , ParamIdx FormatIdx |
| 3921 | ); |
| 3922 | |
| 3923 | FormatArgAttr *clone(ASTContext &C) const; |
| 3924 | void printPretty(raw_ostream &OS, |
| 3925 | const PrintingPolicy &Policy) const; |
| 3926 | const char *getSpelling() const; |
| 3927 | ParamIdx getFormatIdx() const { |
| 3928 | return formatIdx; |
| 3929 | } |
| 3930 | |
| 3931 | |
| 3932 | |
| 3933 | static bool classof(const Attr *A) { return A->getKind() == attr::FormatArg; } |
| 3934 | }; |
| 3935 | |
| 3936 | class GNUInlineAttr : public InheritableAttr { |
| 3937 | public: |
| 3938 | enum Spelling { |
| 3939 | GNU_gnu_inline = 0, |
| 3940 | CXX11_gnu_gnu_inline = 1, |
| 3941 | C2x_gnu_gnu_inline = 2, |
| 3942 | SpellingNotCalculated = 15 |
| 3943 | |
| 3944 | }; |
| 3945 | |
| 3946 | // Factory methods |
| 3947 | static GNUInlineAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3948 | static GNUInlineAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 3949 | static GNUInlineAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3950 | static GNUInlineAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3951 | |
| 3952 | // Constructors |
| 3953 | GNUInlineAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3954 | ); |
| 3955 | |
| 3956 | GNUInlineAttr *clone(ASTContext &C) const; |
| 3957 | void printPretty(raw_ostream &OS, |
| 3958 | const PrintingPolicy &Policy) const; |
| 3959 | const char *getSpelling() const; |
| 3960 | |
| 3961 | |
| 3962 | static bool classof(const Attr *A) { return A->getKind() == attr::GNUInline; } |
| 3963 | }; |
| 3964 | |
| 3965 | class GuardedByAttr : public InheritableAttr { |
| 3966 | Expr * arg; |
| 3967 | |
| 3968 | public: |
| 3969 | // Factory methods |
| 3970 | static GuardedByAttr *CreateImplicit(ASTContext &Ctx, Expr * Arg, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 3971 | static GuardedByAttr *Create(ASTContext &Ctx, Expr * Arg, const AttributeCommonInfo &CommonInfo); |
| 3972 | static GuardedByAttr *CreateImplicit(ASTContext &Ctx, Expr * Arg, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3973 | static GuardedByAttr *Create(ASTContext &Ctx, Expr * Arg, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 3974 | |
| 3975 | // Constructors |
| 3976 | GuardedByAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 3977 | , Expr * Arg |
| 3978 | ); |
| 3979 | |
| 3980 | GuardedByAttr *clone(ASTContext &C) const; |
| 3981 | void printPretty(raw_ostream &OS, |
| 3982 | const PrintingPolicy &Policy) const; |
| 3983 | const char *getSpelling() const; |
| 3984 | Expr * getArg() const { |
| 3985 | return arg; |
| 3986 | } |
| 3987 | |
| 3988 | |
| 3989 | |
| 3990 | static bool classof(const Attr *A) { return A->getKind() == attr::GuardedBy; } |
| 3991 | }; |
| 3992 | |
| 3993 | class GuardedVarAttr : public InheritableAttr { |
| 3994 | public: |
| 3995 | enum Spelling { |
| 3996 | GNU_guarded_var = 0, |
| 3997 | CXX11_clang_guarded_var = 1, |
| 3998 | SpellingNotCalculated = 15 |
| 3999 | |
| 4000 | }; |
| 4001 | |
| 4002 | // Factory methods |
| 4003 | static GuardedVarAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4004 | static GuardedVarAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4005 | static GuardedVarAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4006 | static GuardedVarAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4007 | |
| 4008 | // Constructors |
| 4009 | GuardedVarAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4010 | ); |
| 4011 | |
| 4012 | GuardedVarAttr *clone(ASTContext &C) const; |
| 4013 | void printPretty(raw_ostream &OS, |
| 4014 | const PrintingPolicy &Policy) const; |
| 4015 | const char *getSpelling() const; |
| 4016 | |
| 4017 | |
| 4018 | static bool classof(const Attr *A) { return A->getKind() == attr::GuardedVar; } |
| 4019 | }; |
| 4020 | |
| 4021 | class HIPManagedAttr : public InheritableAttr { |
| 4022 | public: |
| 4023 | enum Spelling { |
| 4024 | GNU_managed = 0, |
| 4025 | Declspec_managed = 1, |
| 4026 | SpellingNotCalculated = 15 |
| 4027 | |
| 4028 | }; |
| 4029 | |
| 4030 | // Factory methods |
| 4031 | static HIPManagedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4032 | static HIPManagedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4033 | static HIPManagedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4034 | static HIPManagedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4035 | |
| 4036 | // Constructors |
| 4037 | HIPManagedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4038 | ); |
| 4039 | |
| 4040 | HIPManagedAttr *clone(ASTContext &C) const; |
| 4041 | void printPretty(raw_ostream &OS, |
| 4042 | const PrintingPolicy &Policy) const; |
| 4043 | const char *getSpelling() const; |
| 4044 | |
| 4045 | |
| 4046 | static bool classof(const Attr *A) { return A->getKind() == attr::HIPManaged; } |
| 4047 | }; |
| 4048 | |
| 4049 | class HotAttr : public InheritableAttr { |
| 4050 | public: |
| 4051 | enum Spelling { |
| 4052 | GNU_hot = 0, |
| 4053 | CXX11_gnu_hot = 1, |
| 4054 | C2x_gnu_hot = 2, |
| 4055 | SpellingNotCalculated = 15 |
| 4056 | |
| 4057 | }; |
| 4058 | |
| 4059 | // Factory methods |
| 4060 | static HotAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4061 | static HotAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4062 | static HotAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4063 | static HotAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4064 | |
| 4065 | // Constructors |
| 4066 | HotAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4067 | ); |
| 4068 | |
| 4069 | HotAttr *clone(ASTContext &C) const; |
| 4070 | void printPretty(raw_ostream &OS, |
| 4071 | const PrintingPolicy &Policy) const; |
| 4072 | const char *getSpelling() const; |
| 4073 | |
| 4074 | |
| 4075 | static bool classof(const Attr *A) { return A->getKind() == attr::Hot; } |
| 4076 | }; |
| 4077 | |
| 4078 | class IBActionAttr : public InheritableAttr { |
| 4079 | public: |
| 4080 | enum Spelling { |
| 4081 | GNU_ibaction = 0, |
| 4082 | CXX11_clang_ibaction = 1, |
| 4083 | C2x_clang_ibaction = 2, |
| 4084 | SpellingNotCalculated = 15 |
| 4085 | |
| 4086 | }; |
| 4087 | |
| 4088 | // Factory methods |
| 4089 | static IBActionAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4090 | static IBActionAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4091 | static IBActionAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4092 | static IBActionAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4093 | |
| 4094 | // Constructors |
| 4095 | IBActionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4096 | ); |
| 4097 | |
| 4098 | IBActionAttr *clone(ASTContext &C) const; |
| 4099 | void printPretty(raw_ostream &OS, |
| 4100 | const PrintingPolicy &Policy) const; |
| 4101 | const char *getSpelling() const; |
| 4102 | |
| 4103 | |
| 4104 | static bool classof(const Attr *A) { return A->getKind() == attr::IBAction; } |
| 4105 | }; |
| 4106 | |
| 4107 | class IBOutletAttr : public InheritableAttr { |
| 4108 | public: |
| 4109 | enum Spelling { |
| 4110 | GNU_iboutlet = 0, |
| 4111 | CXX11_clang_iboutlet = 1, |
| 4112 | C2x_clang_iboutlet = 2, |
| 4113 | SpellingNotCalculated = 15 |
| 4114 | |
| 4115 | }; |
| 4116 | |
| 4117 | // Factory methods |
| 4118 | static IBOutletAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4119 | static IBOutletAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4120 | static IBOutletAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4121 | static IBOutletAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4122 | |
| 4123 | // Constructors |
| 4124 | IBOutletAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4125 | ); |
| 4126 | |
| 4127 | IBOutletAttr *clone(ASTContext &C) const; |
| 4128 | void printPretty(raw_ostream &OS, |
| 4129 | const PrintingPolicy &Policy) const; |
| 4130 | const char *getSpelling() const; |
| 4131 | |
| 4132 | |
| 4133 | static bool classof(const Attr *A) { return A->getKind() == attr::IBOutlet; } |
| 4134 | }; |
| 4135 | |
| 4136 | class IBOutletCollectionAttr : public InheritableAttr { |
| 4137 | TypeSourceInfo * interface_; |
| 4138 | |
| 4139 | public: |
| 4140 | enum Spelling { |
| 4141 | GNU_iboutletcollection = 0, |
| 4142 | CXX11_clang_iboutletcollection = 1, |
| 4143 | C2x_clang_iboutletcollection = 2, |
| 4144 | SpellingNotCalculated = 15 |
| 4145 | |
| 4146 | }; |
| 4147 | |
| 4148 | // Factory methods |
| 4149 | static IBOutletCollectionAttr *CreateImplicit(ASTContext &Ctx, TypeSourceInfo * Interface, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4150 | static IBOutletCollectionAttr *Create(ASTContext &Ctx, TypeSourceInfo * Interface, const AttributeCommonInfo &CommonInfo); |
| 4151 | static IBOutletCollectionAttr *CreateImplicit(ASTContext &Ctx, TypeSourceInfo * Interface, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4152 | static IBOutletCollectionAttr *Create(ASTContext &Ctx, TypeSourceInfo * Interface, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4153 | |
| 4154 | // Constructors |
| 4155 | IBOutletCollectionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4156 | , TypeSourceInfo * Interface |
| 4157 | ); |
| 4158 | IBOutletCollectionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4159 | ); |
| 4160 | |
| 4161 | IBOutletCollectionAttr *clone(ASTContext &C) const; |
| 4162 | void printPretty(raw_ostream &OS, |
| 4163 | const PrintingPolicy &Policy) const; |
| 4164 | const char *getSpelling() const; |
| 4165 | QualType getInterface() const { |
| 4166 | return interface_->getType(); |
| 4167 | } TypeSourceInfo * getInterfaceLoc() const { |
| 4168 | return interface_; |
| 4169 | } |
| 4170 | |
| 4171 | |
| 4172 | |
| 4173 | static bool classof(const Attr *A) { return A->getKind() == attr::IBOutletCollection; } |
| 4174 | }; |
| 4175 | |
| 4176 | class IFuncAttr : public Attr { |
| 4177 | unsigned resolverLength; |
| 4178 | char *resolver; |
| 4179 | |
| 4180 | public: |
| 4181 | enum Spelling { |
| 4182 | GNU_ifunc = 0, |
| 4183 | CXX11_gnu_ifunc = 1, |
| 4184 | C2x_gnu_ifunc = 2, |
| 4185 | SpellingNotCalculated = 15 |
| 4186 | |
| 4187 | }; |
| 4188 | |
| 4189 | // Factory methods |
| 4190 | static IFuncAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Resolver, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4191 | static IFuncAttr *Create(ASTContext &Ctx, llvm::StringRef Resolver, const AttributeCommonInfo &CommonInfo); |
| 4192 | static IFuncAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Resolver, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4193 | static IFuncAttr *Create(ASTContext &Ctx, llvm::StringRef Resolver, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4194 | |
| 4195 | // Constructors |
| 4196 | IFuncAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4197 | , llvm::StringRef Resolver |
| 4198 | ); |
| 4199 | |
| 4200 | IFuncAttr *clone(ASTContext &C) const; |
| 4201 | void printPretty(raw_ostream &OS, |
| 4202 | const PrintingPolicy &Policy) const; |
| 4203 | const char *getSpelling() const; |
| 4204 | llvm::StringRef getResolver() const { |
| 4205 | return llvm::StringRef(resolver, resolverLength); |
| 4206 | } |
| 4207 | unsigned getResolverLength() const { |
| 4208 | return resolverLength; |
| 4209 | } |
| 4210 | void setResolver(ASTContext &C, llvm::StringRef S) { |
| 4211 | resolverLength = S.size(); |
| 4212 | this->resolver = new (C, 1) char [resolverLength]; |
| 4213 | if (!S.empty()) |
| 4214 | std::memcpy(this->resolver, S.data(), resolverLength); |
| 4215 | } |
| 4216 | |
| 4217 | |
| 4218 | |
| 4219 | static bool classof(const Attr *A) { return A->getKind() == attr::IFunc; } |
| 4220 | }; |
| 4221 | |
| 4222 | class InitPriorityAttr : public InheritableAttr { |
| 4223 | unsigned priority; |
| 4224 | |
| 4225 | public: |
| 4226 | enum Spelling { |
| 4227 | GNU_init_priority = 0, |
| 4228 | CXX11_gnu_init_priority = 1, |
| 4229 | SpellingNotCalculated = 15 |
| 4230 | |
| 4231 | }; |
| 4232 | |
| 4233 | // Factory methods |
| 4234 | static InitPriorityAttr *CreateImplicit(ASTContext &Ctx, unsigned Priority, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4235 | static InitPriorityAttr *Create(ASTContext &Ctx, unsigned Priority, const AttributeCommonInfo &CommonInfo); |
| 4236 | static InitPriorityAttr *CreateImplicit(ASTContext &Ctx, unsigned Priority, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4237 | static InitPriorityAttr *Create(ASTContext &Ctx, unsigned Priority, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4238 | |
| 4239 | // Constructors |
| 4240 | InitPriorityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4241 | , unsigned Priority |
| 4242 | ); |
| 4243 | |
| 4244 | InitPriorityAttr *clone(ASTContext &C) const; |
| 4245 | void printPretty(raw_ostream &OS, |
| 4246 | const PrintingPolicy &Policy) const; |
| 4247 | const char *getSpelling() const; |
| 4248 | unsigned getPriority() const { |
| 4249 | return priority; |
| 4250 | } |
| 4251 | |
| 4252 | |
| 4253 | |
| 4254 | static bool classof(const Attr *A) { return A->getKind() == attr::InitPriority; } |
| 4255 | }; |
| 4256 | |
| 4257 | class InitSegAttr : public Attr { |
| 4258 | unsigned sectionLength; |
| 4259 | char *section; |
| 4260 | |
| 4261 | public: |
| 4262 | // Factory methods |
| 4263 | static InitSegAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Section, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4264 | static InitSegAttr *Create(ASTContext &Ctx, llvm::StringRef Section, const AttributeCommonInfo &CommonInfo); |
| 4265 | static InitSegAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Section, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4266 | static InitSegAttr *Create(ASTContext &Ctx, llvm::StringRef Section, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4267 | |
| 4268 | // Constructors |
| 4269 | InitSegAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4270 | , llvm::StringRef Section |
| 4271 | ); |
| 4272 | |
| 4273 | InitSegAttr *clone(ASTContext &C) const; |
| 4274 | void printPretty(raw_ostream &OS, |
| 4275 | const PrintingPolicy &Policy) const; |
| 4276 | const char *getSpelling() const; |
| 4277 | llvm::StringRef getSection() const { |
| 4278 | return llvm::StringRef(section, sectionLength); |
| 4279 | } |
| 4280 | unsigned getSectionLength() const { |
| 4281 | return sectionLength; |
| 4282 | } |
| 4283 | void setSection(ASTContext &C, llvm::StringRef S) { |
| 4284 | sectionLength = S.size(); |
| 4285 | this->section = new (C, 1) char [sectionLength]; |
| 4286 | if (!S.empty()) |
| 4287 | std::memcpy(this->section, S.data(), sectionLength); |
| 4288 | } |
| 4289 | |
| 4290 | |
| 4291 | void printPrettyPragma(raw_ostream &OS, const PrintingPolicy &Policy) const { |
| 4292 | OS << " (" << getSection() << ')'; |
| 4293 | } |
| 4294 | |
| 4295 | |
| 4296 | static bool classof(const Attr *A) { return A->getKind() == attr::InitSeg; } |
| 4297 | }; |
| 4298 | |
| 4299 | class IntelOclBiccAttr : public InheritableAttr { |
| 4300 | public: |
| 4301 | enum Spelling { |
| 4302 | GNU_intel_ocl_bicc = 0, |
| 4303 | CXX11_clang_intel_ocl_bicc = 1, |
| 4304 | SpellingNotCalculated = 15 |
| 4305 | |
| 4306 | }; |
| 4307 | |
| 4308 | // Factory methods |
| 4309 | static IntelOclBiccAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4310 | static IntelOclBiccAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4311 | static IntelOclBiccAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4312 | static IntelOclBiccAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4313 | |
| 4314 | // Constructors |
| 4315 | IntelOclBiccAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4316 | ); |
| 4317 | |
| 4318 | IntelOclBiccAttr *clone(ASTContext &C) const; |
| 4319 | void printPretty(raw_ostream &OS, |
| 4320 | const PrintingPolicy &Policy) const; |
| 4321 | const char *getSpelling() const; |
| 4322 | |
| 4323 | |
| 4324 | static bool classof(const Attr *A) { return A->getKind() == attr::IntelOclBicc; } |
| 4325 | }; |
| 4326 | |
| 4327 | class InternalLinkageAttr : public InheritableAttr { |
| 4328 | public: |
| 4329 | enum Spelling { |
| 4330 | GNU_internal_linkage = 0, |
| 4331 | CXX11_clang_internal_linkage = 1, |
| 4332 | C2x_clang_internal_linkage = 2, |
| 4333 | SpellingNotCalculated = 15 |
| 4334 | |
| 4335 | }; |
| 4336 | |
| 4337 | // Factory methods |
| 4338 | static InternalLinkageAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4339 | static InternalLinkageAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4340 | static InternalLinkageAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4341 | static InternalLinkageAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4342 | |
| 4343 | // Constructors |
| 4344 | InternalLinkageAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4345 | ); |
| 4346 | |
| 4347 | InternalLinkageAttr *clone(ASTContext &C) const; |
| 4348 | void printPretty(raw_ostream &OS, |
| 4349 | const PrintingPolicy &Policy) const; |
| 4350 | const char *getSpelling() const; |
| 4351 | |
| 4352 | |
| 4353 | static bool classof(const Attr *A) { return A->getKind() == attr::InternalLinkage; } |
| 4354 | }; |
| 4355 | |
| 4356 | class LTOVisibilityPublicAttr : public InheritableAttr { |
| 4357 | public: |
| 4358 | enum Spelling { |
| 4359 | GNU_lto_visibility_public = 0, |
| 4360 | CXX11_clang_lto_visibility_public = 1, |
| 4361 | C2x_clang_lto_visibility_public = 2, |
| 4362 | SpellingNotCalculated = 15 |
| 4363 | |
| 4364 | }; |
| 4365 | |
| 4366 | // Factory methods |
| 4367 | static LTOVisibilityPublicAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4368 | static LTOVisibilityPublicAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4369 | static LTOVisibilityPublicAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4370 | static LTOVisibilityPublicAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4371 | |
| 4372 | // Constructors |
| 4373 | LTOVisibilityPublicAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4374 | ); |
| 4375 | |
| 4376 | LTOVisibilityPublicAttr *clone(ASTContext &C) const; |
| 4377 | void printPretty(raw_ostream &OS, |
| 4378 | const PrintingPolicy &Policy) const; |
| 4379 | const char *getSpelling() const; |
| 4380 | |
| 4381 | |
| 4382 | static bool classof(const Attr *A) { return A->getKind() == attr::LTOVisibilityPublic; } |
| 4383 | }; |
| 4384 | |
| 4385 | class LayoutVersionAttr : public InheritableAttr { |
| 4386 | unsigned version; |
| 4387 | |
| 4388 | public: |
| 4389 | // Factory methods |
| 4390 | static LayoutVersionAttr *CreateImplicit(ASTContext &Ctx, unsigned Version, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4391 | static LayoutVersionAttr *Create(ASTContext &Ctx, unsigned Version, const AttributeCommonInfo &CommonInfo); |
| 4392 | static LayoutVersionAttr *CreateImplicit(ASTContext &Ctx, unsigned Version, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4393 | static LayoutVersionAttr *Create(ASTContext &Ctx, unsigned Version, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4394 | |
| 4395 | // Constructors |
| 4396 | LayoutVersionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4397 | , unsigned Version |
| 4398 | ); |
| 4399 | |
| 4400 | LayoutVersionAttr *clone(ASTContext &C) const; |
| 4401 | void printPretty(raw_ostream &OS, |
| 4402 | const PrintingPolicy &Policy) const; |
| 4403 | const char *getSpelling() const; |
| 4404 | unsigned getVersion() const { |
| 4405 | return version; |
| 4406 | } |
| 4407 | |
| 4408 | |
| 4409 | |
| 4410 | static bool classof(const Attr *A) { return A->getKind() == attr::LayoutVersion; } |
| 4411 | }; |
| 4412 | |
| 4413 | class LeafAttr : public InheritableAttr { |
| 4414 | public: |
| 4415 | enum Spelling { |
| 4416 | GNU_leaf = 0, |
| 4417 | CXX11_gnu_leaf = 1, |
| 4418 | C2x_gnu_leaf = 2, |
| 4419 | SpellingNotCalculated = 15 |
| 4420 | |
| 4421 | }; |
| 4422 | |
| 4423 | // Factory methods |
| 4424 | static LeafAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4425 | static LeafAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4426 | static LeafAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4427 | static LeafAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4428 | |
| 4429 | // Constructors |
| 4430 | LeafAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4431 | ); |
| 4432 | |
| 4433 | LeafAttr *clone(ASTContext &C) const; |
| 4434 | void printPretty(raw_ostream &OS, |
| 4435 | const PrintingPolicy &Policy) const; |
| 4436 | const char *getSpelling() const; |
| 4437 | |
| 4438 | |
| 4439 | static bool classof(const Attr *A) { return A->getKind() == attr::Leaf; } |
| 4440 | }; |
| 4441 | |
| 4442 | class LifetimeBoundAttr : public InheritableAttr { |
| 4443 | public: |
| 4444 | enum Spelling { |
| 4445 | GNU_lifetimebound = 0, |
| 4446 | CXX11_clang_lifetimebound = 1, |
| 4447 | SpellingNotCalculated = 15 |
| 4448 | |
| 4449 | }; |
| 4450 | |
| 4451 | // Factory methods |
| 4452 | static LifetimeBoundAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4453 | static LifetimeBoundAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4454 | static LifetimeBoundAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4455 | static LifetimeBoundAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4456 | |
| 4457 | // Constructors |
| 4458 | LifetimeBoundAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4459 | ); |
| 4460 | |
| 4461 | LifetimeBoundAttr *clone(ASTContext &C) const; |
| 4462 | void printPretty(raw_ostream &OS, |
| 4463 | const PrintingPolicy &Policy) const; |
| 4464 | const char *getSpelling() const; |
| 4465 | |
| 4466 | |
| 4467 | static bool classof(const Attr *A) { return A->getKind() == attr::LifetimeBound; } |
| 4468 | }; |
| 4469 | |
| 4470 | class LikelyAttr : public StmtAttr { |
| 4471 | public: |
| 4472 | enum Spelling { |
| 4473 | CXX11_likely = 0, |
| 4474 | C2x_clang_likely = 1, |
| 4475 | SpellingNotCalculated = 15 |
| 4476 | |
| 4477 | }; |
| 4478 | |
| 4479 | // Factory methods |
| 4480 | static LikelyAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4481 | static LikelyAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4482 | static LikelyAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4483 | static LikelyAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4484 | |
| 4485 | // Constructors |
| 4486 | LikelyAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4487 | ); |
| 4488 | |
| 4489 | LikelyAttr *clone(ASTContext &C) const; |
| 4490 | void printPretty(raw_ostream &OS, |
| 4491 | const PrintingPolicy &Policy) const; |
| 4492 | const char *getSpelling() const; |
| 4493 | |
| 4494 | |
| 4495 | static bool classof(const Attr *A) { return A->getKind() == attr::Likely; } |
| 4496 | }; |
| 4497 | |
| 4498 | class LoaderUninitializedAttr : public Attr { |
| 4499 | public: |
| 4500 | enum Spelling { |
| 4501 | GNU_loader_uninitialized = 0, |
| 4502 | CXX11_clang_loader_uninitialized = 1, |
| 4503 | C2x_clang_loader_uninitialized = 2, |
| 4504 | SpellingNotCalculated = 15 |
| 4505 | |
| 4506 | }; |
| 4507 | |
| 4508 | // Factory methods |
| 4509 | static LoaderUninitializedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4510 | static LoaderUninitializedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4511 | static LoaderUninitializedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4512 | static LoaderUninitializedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4513 | |
| 4514 | // Constructors |
| 4515 | LoaderUninitializedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4516 | ); |
| 4517 | |
| 4518 | LoaderUninitializedAttr *clone(ASTContext &C) const; |
| 4519 | void printPretty(raw_ostream &OS, |
| 4520 | const PrintingPolicy &Policy) const; |
| 4521 | const char *getSpelling() const; |
| 4522 | |
| 4523 | |
| 4524 | static bool classof(const Attr *A) { return A->getKind() == attr::LoaderUninitialized; } |
| 4525 | }; |
| 4526 | |
| 4527 | class LockReturnedAttr : public InheritableAttr { |
| 4528 | Expr * arg; |
| 4529 | |
| 4530 | public: |
| 4531 | // Factory methods |
| 4532 | static LockReturnedAttr *CreateImplicit(ASTContext &Ctx, Expr * Arg, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4533 | static LockReturnedAttr *Create(ASTContext &Ctx, Expr * Arg, const AttributeCommonInfo &CommonInfo); |
| 4534 | static LockReturnedAttr *CreateImplicit(ASTContext &Ctx, Expr * Arg, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4535 | static LockReturnedAttr *Create(ASTContext &Ctx, Expr * Arg, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4536 | |
| 4537 | // Constructors |
| 4538 | LockReturnedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4539 | , Expr * Arg |
| 4540 | ); |
| 4541 | |
| 4542 | LockReturnedAttr *clone(ASTContext &C) const; |
| 4543 | void printPretty(raw_ostream &OS, |
| 4544 | const PrintingPolicy &Policy) const; |
| 4545 | const char *getSpelling() const; |
| 4546 | Expr * getArg() const { |
| 4547 | return arg; |
| 4548 | } |
| 4549 | |
| 4550 | |
| 4551 | |
| 4552 | static bool classof(const Attr *A) { return A->getKind() == attr::LockReturned; } |
| 4553 | }; |
| 4554 | |
| 4555 | class LocksExcludedAttr : public InheritableAttr { |
| 4556 | unsigned args_Size; |
| 4557 | Expr * *args_; |
| 4558 | |
| 4559 | public: |
| 4560 | // Factory methods |
| 4561 | static LocksExcludedAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4562 | static LocksExcludedAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 4563 | static LocksExcludedAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4564 | static LocksExcludedAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4565 | |
| 4566 | // Constructors |
| 4567 | LocksExcludedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4568 | , Expr * *Args, unsigned ArgsSize |
| 4569 | ); |
| 4570 | LocksExcludedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4571 | ); |
| 4572 | |
| 4573 | LocksExcludedAttr *clone(ASTContext &C) const; |
| 4574 | void printPretty(raw_ostream &OS, |
| 4575 | const PrintingPolicy &Policy) const; |
| 4576 | const char *getSpelling() const; |
| 4577 | typedef Expr ** args_iterator; |
| 4578 | args_iterator args_begin() const { return args_; } |
| 4579 | args_iterator args_end() const { return args_ + args_Size; } |
| 4580 | unsigned args_size() const { return args_Size; } |
| 4581 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 4582 | |
| 4583 | |
| 4584 | |
| 4585 | |
| 4586 | static bool classof(const Attr *A) { return A->getKind() == attr::LocksExcluded; } |
| 4587 | }; |
| 4588 | |
| 4589 | class LoopHintAttr : public Attr { |
| 4590 | public: |
| 4591 | enum OptionType { |
| 4592 | Vectorize, |
| 4593 | VectorizeWidth, |
| 4594 | Interleave, |
| 4595 | InterleaveCount, |
| 4596 | Unroll, |
| 4597 | UnrollCount, |
| 4598 | UnrollAndJam, |
| 4599 | UnrollAndJamCount, |
| 4600 | PipelineDisabled, |
| 4601 | PipelineInitiationInterval, |
| 4602 | Distribute, |
| 4603 | VectorizePredicate |
| 4604 | }; |
| 4605 | private: |
| 4606 | OptionType option; |
| 4607 | |
| 4608 | public: |
| 4609 | enum LoopHintState { |
| 4610 | Enable, |
| 4611 | Disable, |
| 4612 | Numeric, |
| 4613 | FixedWidth, |
| 4614 | ScalableWidth, |
| 4615 | AssumeSafety, |
| 4616 | Full |
| 4617 | }; |
| 4618 | private: |
| 4619 | LoopHintState state; |
| 4620 | |
| 4621 | Expr * value; |
| 4622 | |
| 4623 | public: |
| 4624 | enum Spelling { |
| 4625 | Pragma_clang_loop = 0, |
| 4626 | Pragma_unroll = 1, |
| 4627 | Pragma_nounroll = 2, |
| 4628 | Pragma_unroll_and_jam = 3, |
| 4629 | Pragma_nounroll_and_jam = 4, |
| 4630 | SpellingNotCalculated = 15 |
| 4631 | |
| 4632 | }; |
| 4633 | |
| 4634 | // Factory methods |
| 4635 | static LoopHintAttr *CreateImplicit(ASTContext &Ctx, OptionType Option, LoopHintState State, Expr * Value, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4636 | static LoopHintAttr *Create(ASTContext &Ctx, OptionType Option, LoopHintState State, Expr * Value, const AttributeCommonInfo &CommonInfo); |
| 4637 | static LoopHintAttr *CreateImplicit(ASTContext &Ctx, OptionType Option, LoopHintState State, Expr * Value, SourceRange Range, AttributeCommonInfo::Syntax Syntax, LoopHintAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 4638 | static LoopHintAttr *Create(ASTContext &Ctx, OptionType Option, LoopHintState State, Expr * Value, SourceRange Range, AttributeCommonInfo::Syntax Syntax, LoopHintAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 4639 | |
| 4640 | // Constructors |
| 4641 | LoopHintAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4642 | , OptionType Option |
| 4643 | , LoopHintState State |
| 4644 | , Expr * Value |
| 4645 | ); |
| 4646 | |
| 4647 | LoopHintAttr *clone(ASTContext &C) const; |
| 4648 | void printPretty(raw_ostream &OS, |
| 4649 | const PrintingPolicy &Policy) const; |
| 4650 | const char *getSpelling() const; |
| 4651 | Spelling getSemanticSpelling() const; |
| 4652 | OptionType getOption() const { |
| 4653 | return option; |
| 4654 | } |
| 4655 | |
| 4656 | static bool ConvertStrToOptionType(StringRef Val, OptionType &Out); |
| 4657 | static const char *ConvertOptionTypeToStr(OptionType Val); |
| 4658 | LoopHintState getState() const { |
| 4659 | return state; |
| 4660 | } |
| 4661 | |
| 4662 | static bool ConvertStrToLoopHintState(StringRef Val, LoopHintState &Out); |
| 4663 | static const char *ConvertLoopHintStateToStr(LoopHintState Val); |
| 4664 | Expr * getValue() const { |
| 4665 | return value; |
| 4666 | } |
| 4667 | |
| 4668 | |
| 4669 | static const char *getOptionName(int Option) { |
| 4670 | switch(Option) { |
| 4671 | case Vectorize: return "vectorize" ; |
| 4672 | case VectorizeWidth: return "vectorize_width" ; |
| 4673 | case Interleave: return "interleave" ; |
| 4674 | case InterleaveCount: return "interleave_count" ; |
| 4675 | case Unroll: return "unroll" ; |
| 4676 | case UnrollCount: return "unroll_count" ; |
| 4677 | case UnrollAndJam: return "unroll_and_jam" ; |
| 4678 | case UnrollAndJamCount: return "unroll_and_jam_count" ; |
| 4679 | case PipelineDisabled: return "pipeline" ; |
| 4680 | case PipelineInitiationInterval: return "pipeline_initiation_interval" ; |
| 4681 | case Distribute: return "distribute" ; |
| 4682 | case VectorizePredicate: return "vectorize_predicate" ; |
| 4683 | } |
| 4684 | llvm_unreachable("Unhandled LoopHint option." ); |
| 4685 | } |
| 4686 | |
| 4687 | void printPrettyPragma(raw_ostream &OS, const PrintingPolicy &Policy) const; |
| 4688 | |
| 4689 | // Return a string containing the loop hint argument including the |
| 4690 | // enclosing parentheses. |
| 4691 | std::string getValueString(const PrintingPolicy &Policy) const; |
| 4692 | |
| 4693 | // Return a string suitable for identifying this attribute in diagnostics. |
| 4694 | std::string getDiagnosticName(const PrintingPolicy &Policy) const; |
| 4695 | |
| 4696 | |
| 4697 | static bool classof(const Attr *A) { return A->getKind() == attr::LoopHint; } |
| 4698 | }; |
| 4699 | |
| 4700 | class MIGServerRoutineAttr : public InheritableAttr { |
| 4701 | public: |
| 4702 | enum Spelling { |
| 4703 | GNU_mig_server_routine = 0, |
| 4704 | CXX11_clang_mig_server_routine = 1, |
| 4705 | C2x_clang_mig_server_routine = 2, |
| 4706 | SpellingNotCalculated = 15 |
| 4707 | |
| 4708 | }; |
| 4709 | |
| 4710 | // Factory methods |
| 4711 | static MIGServerRoutineAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4712 | static MIGServerRoutineAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4713 | static MIGServerRoutineAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4714 | static MIGServerRoutineAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4715 | |
| 4716 | // Constructors |
| 4717 | MIGServerRoutineAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4718 | ); |
| 4719 | |
| 4720 | MIGServerRoutineAttr *clone(ASTContext &C) const; |
| 4721 | void printPretty(raw_ostream &OS, |
| 4722 | const PrintingPolicy &Policy) const; |
| 4723 | const char *getSpelling() const; |
| 4724 | |
| 4725 | |
| 4726 | static bool classof(const Attr *A) { return A->getKind() == attr::MIGServerRoutine; } |
| 4727 | }; |
| 4728 | |
| 4729 | class MSABIAttr : public InheritableAttr { |
| 4730 | public: |
| 4731 | enum Spelling { |
| 4732 | GNU_ms_abi = 0, |
| 4733 | CXX11_gnu_ms_abi = 1, |
| 4734 | C2x_gnu_ms_abi = 2, |
| 4735 | SpellingNotCalculated = 15 |
| 4736 | |
| 4737 | }; |
| 4738 | |
| 4739 | // Factory methods |
| 4740 | static MSABIAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4741 | static MSABIAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4742 | static MSABIAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4743 | static MSABIAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4744 | |
| 4745 | // Constructors |
| 4746 | MSABIAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4747 | ); |
| 4748 | |
| 4749 | MSABIAttr *clone(ASTContext &C) const; |
| 4750 | void printPretty(raw_ostream &OS, |
| 4751 | const PrintingPolicy &Policy) const; |
| 4752 | const char *getSpelling() const; |
| 4753 | |
| 4754 | |
| 4755 | static bool classof(const Attr *A) { return A->getKind() == attr::MSABI; } |
| 4756 | }; |
| 4757 | |
| 4758 | class MSAllocatorAttr : public InheritableAttr { |
| 4759 | public: |
| 4760 | // Factory methods |
| 4761 | static MSAllocatorAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4762 | static MSAllocatorAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4763 | static MSAllocatorAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4764 | static MSAllocatorAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4765 | |
| 4766 | // Constructors |
| 4767 | MSAllocatorAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4768 | ); |
| 4769 | |
| 4770 | MSAllocatorAttr *clone(ASTContext &C) const; |
| 4771 | void printPretty(raw_ostream &OS, |
| 4772 | const PrintingPolicy &Policy) const; |
| 4773 | const char *getSpelling() const; |
| 4774 | |
| 4775 | |
| 4776 | static bool classof(const Attr *A) { return A->getKind() == attr::MSAllocator; } |
| 4777 | }; |
| 4778 | |
| 4779 | class MSInheritanceAttr : public InheritableAttr { |
| 4780 | bool bestCase; |
| 4781 | |
| 4782 | public: |
| 4783 | enum Spelling { |
| 4784 | Keyword_single_inheritance = 0, |
| 4785 | Keyword_multiple_inheritance = 1, |
| 4786 | Keyword_virtual_inheritance = 2, |
| 4787 | Keyword_unspecified_inheritance = 3, |
| 4788 | SpellingNotCalculated = 15 |
| 4789 | |
| 4790 | }; |
| 4791 | |
| 4792 | // Factory methods |
| 4793 | static MSInheritanceAttr *CreateImplicit(ASTContext &Ctx, bool BestCase, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4794 | static MSInheritanceAttr *Create(ASTContext &Ctx, bool BestCase, const AttributeCommonInfo &CommonInfo); |
| 4795 | static MSInheritanceAttr *CreateImplicit(ASTContext &Ctx, bool BestCase, SourceRange Range, AttributeCommonInfo::Syntax Syntax, MSInheritanceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 4796 | static MSInheritanceAttr *Create(ASTContext &Ctx, bool BestCase, SourceRange Range, AttributeCommonInfo::Syntax Syntax, MSInheritanceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 4797 | static MSInheritanceAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4798 | static MSInheritanceAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4799 | static MSInheritanceAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, MSInheritanceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 4800 | static MSInheritanceAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, MSInheritanceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 4801 | |
| 4802 | // Constructors |
| 4803 | MSInheritanceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4804 | , bool BestCase |
| 4805 | ); |
| 4806 | MSInheritanceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4807 | ); |
| 4808 | |
| 4809 | MSInheritanceAttr *clone(ASTContext &C) const; |
| 4810 | void printPretty(raw_ostream &OS, |
| 4811 | const PrintingPolicy &Policy) const; |
| 4812 | const char *getSpelling() const; |
| 4813 | Spelling getSemanticSpelling() const; |
| 4814 | bool getBestCase() const { |
| 4815 | return bestCase; |
| 4816 | } |
| 4817 | |
| 4818 | static const bool DefaultBestCase = true; |
| 4819 | |
| 4820 | |
| 4821 | MSInheritanceModel getInheritanceModel() const { |
| 4822 | // The spelling enum should agree with MSInheritanceModel. |
| 4823 | return MSInheritanceModel(getSemanticSpelling()); |
| 4824 | } |
| 4825 | |
| 4826 | |
| 4827 | static bool classof(const Attr *A) { return A->getKind() == attr::MSInheritance; } |
| 4828 | }; |
| 4829 | |
| 4830 | class MSNoVTableAttr : public InheritableAttr { |
| 4831 | public: |
| 4832 | // Factory methods |
| 4833 | static MSNoVTableAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4834 | static MSNoVTableAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4835 | static MSNoVTableAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4836 | static MSNoVTableAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4837 | |
| 4838 | // Constructors |
| 4839 | MSNoVTableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4840 | ); |
| 4841 | |
| 4842 | MSNoVTableAttr *clone(ASTContext &C) const; |
| 4843 | void printPretty(raw_ostream &OS, |
| 4844 | const PrintingPolicy &Policy) const; |
| 4845 | const char *getSpelling() const; |
| 4846 | |
| 4847 | |
| 4848 | static bool classof(const Attr *A) { return A->getKind() == attr::MSNoVTable; } |
| 4849 | }; |
| 4850 | |
| 4851 | class MSP430InterruptAttr : public InheritableAttr { |
| 4852 | unsigned number; |
| 4853 | |
| 4854 | public: |
| 4855 | enum Spelling { |
| 4856 | GNU_interrupt = 0, |
| 4857 | CXX11_gnu_interrupt = 1, |
| 4858 | C2x_gnu_interrupt = 2, |
| 4859 | SpellingNotCalculated = 15 |
| 4860 | |
| 4861 | }; |
| 4862 | |
| 4863 | // Factory methods |
| 4864 | static MSP430InterruptAttr *CreateImplicit(ASTContext &Ctx, unsigned Number, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4865 | static MSP430InterruptAttr *Create(ASTContext &Ctx, unsigned Number, const AttributeCommonInfo &CommonInfo); |
| 4866 | static MSP430InterruptAttr *CreateImplicit(ASTContext &Ctx, unsigned Number, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4867 | static MSP430InterruptAttr *Create(ASTContext &Ctx, unsigned Number, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4868 | |
| 4869 | // Constructors |
| 4870 | MSP430InterruptAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4871 | , unsigned Number |
| 4872 | ); |
| 4873 | |
| 4874 | MSP430InterruptAttr *clone(ASTContext &C) const; |
| 4875 | void printPretty(raw_ostream &OS, |
| 4876 | const PrintingPolicy &Policy) const; |
| 4877 | const char *getSpelling() const; |
| 4878 | unsigned getNumber() const { |
| 4879 | return number; |
| 4880 | } |
| 4881 | |
| 4882 | |
| 4883 | |
| 4884 | static bool classof(const Attr *A) { return A->getKind() == attr::MSP430Interrupt; } |
| 4885 | }; |
| 4886 | |
| 4887 | class MSStructAttr : public InheritableAttr { |
| 4888 | public: |
| 4889 | enum Spelling { |
| 4890 | GNU_ms_struct = 0, |
| 4891 | CXX11_gnu_ms_struct = 1, |
| 4892 | C2x_gnu_ms_struct = 2, |
| 4893 | SpellingNotCalculated = 15 |
| 4894 | |
| 4895 | }; |
| 4896 | |
| 4897 | // Factory methods |
| 4898 | static MSStructAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4899 | static MSStructAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4900 | static MSStructAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4901 | static MSStructAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4902 | |
| 4903 | // Constructors |
| 4904 | MSStructAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4905 | ); |
| 4906 | |
| 4907 | MSStructAttr *clone(ASTContext &C) const; |
| 4908 | void printPretty(raw_ostream &OS, |
| 4909 | const PrintingPolicy &Policy) const; |
| 4910 | const char *getSpelling() const; |
| 4911 | |
| 4912 | |
| 4913 | static bool classof(const Attr *A) { return A->getKind() == attr::MSStruct; } |
| 4914 | }; |
| 4915 | |
| 4916 | class MSVtorDispAttr : public InheritableAttr { |
| 4917 | unsigned vdm; |
| 4918 | |
| 4919 | public: |
| 4920 | // Factory methods |
| 4921 | static MSVtorDispAttr *CreateImplicit(ASTContext &Ctx, unsigned Vdm, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4922 | static MSVtorDispAttr *Create(ASTContext &Ctx, unsigned Vdm, const AttributeCommonInfo &CommonInfo); |
| 4923 | static MSVtorDispAttr *CreateImplicit(ASTContext &Ctx, unsigned Vdm, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4924 | static MSVtorDispAttr *Create(ASTContext &Ctx, unsigned Vdm, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4925 | |
| 4926 | // Constructors |
| 4927 | MSVtorDispAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4928 | , unsigned Vdm |
| 4929 | ); |
| 4930 | |
| 4931 | MSVtorDispAttr *clone(ASTContext &C) const; |
| 4932 | void printPretty(raw_ostream &OS, |
| 4933 | const PrintingPolicy &Policy) const; |
| 4934 | const char *getSpelling() const; |
| 4935 | unsigned getVdm() const { |
| 4936 | return vdm; |
| 4937 | } |
| 4938 | |
| 4939 | |
| 4940 | MSVtorDispMode getVtorDispMode() const { return MSVtorDispMode(vdm); } |
| 4941 | |
| 4942 | |
| 4943 | static bool classof(const Attr *A) { return A->getKind() == attr::MSVtorDisp; } |
| 4944 | }; |
| 4945 | |
| 4946 | class MaxFieldAlignmentAttr : public InheritableAttr { |
| 4947 | unsigned alignment; |
| 4948 | |
| 4949 | public: |
| 4950 | // Factory methods |
| 4951 | static MaxFieldAlignmentAttr *CreateImplicit(ASTContext &Ctx, unsigned Alignment, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4952 | static MaxFieldAlignmentAttr *Create(ASTContext &Ctx, unsigned Alignment, const AttributeCommonInfo &CommonInfo); |
| 4953 | static MaxFieldAlignmentAttr *CreateImplicit(ASTContext &Ctx, unsigned Alignment, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4954 | static MaxFieldAlignmentAttr *Create(ASTContext &Ctx, unsigned Alignment, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4955 | |
| 4956 | // Constructors |
| 4957 | MaxFieldAlignmentAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4958 | , unsigned Alignment |
| 4959 | ); |
| 4960 | |
| 4961 | MaxFieldAlignmentAttr *clone(ASTContext &C) const; |
| 4962 | void printPretty(raw_ostream &OS, |
| 4963 | const PrintingPolicy &Policy) const; |
| 4964 | const char *getSpelling() const; |
| 4965 | unsigned getAlignment() const { |
| 4966 | return alignment; |
| 4967 | } |
| 4968 | |
| 4969 | |
| 4970 | |
| 4971 | static bool classof(const Attr *A) { return A->getKind() == attr::MaxFieldAlignment; } |
| 4972 | }; |
| 4973 | |
| 4974 | class MayAliasAttr : public InheritableAttr { |
| 4975 | public: |
| 4976 | enum Spelling { |
| 4977 | GNU_may_alias = 0, |
| 4978 | CXX11_gnu_may_alias = 1, |
| 4979 | C2x_gnu_may_alias = 2, |
| 4980 | SpellingNotCalculated = 15 |
| 4981 | |
| 4982 | }; |
| 4983 | |
| 4984 | // Factory methods |
| 4985 | static MayAliasAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 4986 | static MayAliasAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 4987 | static MayAliasAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4988 | static MayAliasAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 4989 | |
| 4990 | // Constructors |
| 4991 | MayAliasAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 4992 | ); |
| 4993 | |
| 4994 | MayAliasAttr *clone(ASTContext &C) const; |
| 4995 | void printPretty(raw_ostream &OS, |
| 4996 | const PrintingPolicy &Policy) const; |
| 4997 | const char *getSpelling() const; |
| 4998 | |
| 4999 | |
| 5000 | static bool classof(const Attr *A) { return A->getKind() == attr::MayAlias; } |
| 5001 | }; |
| 5002 | |
| 5003 | class MicroMipsAttr : public InheritableAttr { |
| 5004 | public: |
| 5005 | enum Spelling { |
| 5006 | GNU_micromips = 0, |
| 5007 | CXX11_gnu_micromips = 1, |
| 5008 | C2x_gnu_micromips = 2, |
| 5009 | SpellingNotCalculated = 15 |
| 5010 | |
| 5011 | }; |
| 5012 | |
| 5013 | // Factory methods |
| 5014 | static MicroMipsAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5015 | static MicroMipsAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5016 | static MicroMipsAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5017 | static MicroMipsAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5018 | |
| 5019 | // Constructors |
| 5020 | MicroMipsAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5021 | ); |
| 5022 | |
| 5023 | MicroMipsAttr *clone(ASTContext &C) const; |
| 5024 | void printPretty(raw_ostream &OS, |
| 5025 | const PrintingPolicy &Policy) const; |
| 5026 | const char *getSpelling() const; |
| 5027 | |
| 5028 | |
| 5029 | static bool classof(const Attr *A) { return A->getKind() == attr::MicroMips; } |
| 5030 | }; |
| 5031 | |
| 5032 | class MinSizeAttr : public InheritableAttr { |
| 5033 | public: |
| 5034 | enum Spelling { |
| 5035 | GNU_minsize = 0, |
| 5036 | CXX11_clang_minsize = 1, |
| 5037 | C2x_clang_minsize = 2, |
| 5038 | SpellingNotCalculated = 15 |
| 5039 | |
| 5040 | }; |
| 5041 | |
| 5042 | // Factory methods |
| 5043 | static MinSizeAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5044 | static MinSizeAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5045 | static MinSizeAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5046 | static MinSizeAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5047 | |
| 5048 | // Constructors |
| 5049 | MinSizeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5050 | ); |
| 5051 | |
| 5052 | MinSizeAttr *clone(ASTContext &C) const; |
| 5053 | void printPretty(raw_ostream &OS, |
| 5054 | const PrintingPolicy &Policy) const; |
| 5055 | const char *getSpelling() const; |
| 5056 | |
| 5057 | |
| 5058 | static bool classof(const Attr *A) { return A->getKind() == attr::MinSize; } |
| 5059 | }; |
| 5060 | |
| 5061 | class MinVectorWidthAttr : public InheritableAttr { |
| 5062 | unsigned vectorWidth; |
| 5063 | |
| 5064 | public: |
| 5065 | enum Spelling { |
| 5066 | GNU_min_vector_width = 0, |
| 5067 | CXX11_clang_min_vector_width = 1, |
| 5068 | C2x_clang_min_vector_width = 2, |
| 5069 | SpellingNotCalculated = 15 |
| 5070 | |
| 5071 | }; |
| 5072 | |
| 5073 | // Factory methods |
| 5074 | static MinVectorWidthAttr *CreateImplicit(ASTContext &Ctx, unsigned VectorWidth, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5075 | static MinVectorWidthAttr *Create(ASTContext &Ctx, unsigned VectorWidth, const AttributeCommonInfo &CommonInfo); |
| 5076 | static MinVectorWidthAttr *CreateImplicit(ASTContext &Ctx, unsigned VectorWidth, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5077 | static MinVectorWidthAttr *Create(ASTContext &Ctx, unsigned VectorWidth, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5078 | |
| 5079 | // Constructors |
| 5080 | MinVectorWidthAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5081 | , unsigned VectorWidth |
| 5082 | ); |
| 5083 | |
| 5084 | MinVectorWidthAttr *clone(ASTContext &C) const; |
| 5085 | void printPretty(raw_ostream &OS, |
| 5086 | const PrintingPolicy &Policy) const; |
| 5087 | const char *getSpelling() const; |
| 5088 | unsigned getVectorWidth() const { |
| 5089 | return vectorWidth; |
| 5090 | } |
| 5091 | |
| 5092 | |
| 5093 | |
| 5094 | static bool classof(const Attr *A) { return A->getKind() == attr::MinVectorWidth; } |
| 5095 | }; |
| 5096 | |
| 5097 | class Mips16Attr : public InheritableAttr { |
| 5098 | public: |
| 5099 | enum Spelling { |
| 5100 | GNU_mips16 = 0, |
| 5101 | CXX11_gnu_mips16 = 1, |
| 5102 | C2x_gnu_mips16 = 2, |
| 5103 | SpellingNotCalculated = 15 |
| 5104 | |
| 5105 | }; |
| 5106 | |
| 5107 | // Factory methods |
| 5108 | static Mips16Attr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5109 | static Mips16Attr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5110 | static Mips16Attr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5111 | static Mips16Attr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5112 | |
| 5113 | // Constructors |
| 5114 | Mips16Attr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5115 | ); |
| 5116 | |
| 5117 | Mips16Attr *clone(ASTContext &C) const; |
| 5118 | void printPretty(raw_ostream &OS, |
| 5119 | const PrintingPolicy &Policy) const; |
| 5120 | const char *getSpelling() const; |
| 5121 | |
| 5122 | |
| 5123 | static bool classof(const Attr *A) { return A->getKind() == attr::Mips16; } |
| 5124 | }; |
| 5125 | |
| 5126 | class MipsInterruptAttr : public InheritableAttr { |
| 5127 | public: |
| 5128 | enum InterruptType { |
| 5129 | sw0, |
| 5130 | sw1, |
| 5131 | hw0, |
| 5132 | hw1, |
| 5133 | hw2, |
| 5134 | hw3, |
| 5135 | hw4, |
| 5136 | hw5, |
| 5137 | eic |
| 5138 | }; |
| 5139 | private: |
| 5140 | InterruptType interrupt; |
| 5141 | |
| 5142 | public: |
| 5143 | enum Spelling { |
| 5144 | GNU_interrupt = 0, |
| 5145 | CXX11_gnu_interrupt = 1, |
| 5146 | C2x_gnu_interrupt = 2, |
| 5147 | SpellingNotCalculated = 15 |
| 5148 | |
| 5149 | }; |
| 5150 | |
| 5151 | // Factory methods |
| 5152 | static MipsInterruptAttr *CreateImplicit(ASTContext &Ctx, InterruptType Interrupt, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5153 | static MipsInterruptAttr *Create(ASTContext &Ctx, InterruptType Interrupt, const AttributeCommonInfo &CommonInfo); |
| 5154 | static MipsInterruptAttr *CreateImplicit(ASTContext &Ctx, InterruptType Interrupt, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5155 | static MipsInterruptAttr *Create(ASTContext &Ctx, InterruptType Interrupt, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5156 | |
| 5157 | // Constructors |
| 5158 | MipsInterruptAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5159 | , InterruptType Interrupt |
| 5160 | ); |
| 5161 | |
| 5162 | MipsInterruptAttr *clone(ASTContext &C) const; |
| 5163 | void printPretty(raw_ostream &OS, |
| 5164 | const PrintingPolicy &Policy) const; |
| 5165 | const char *getSpelling() const; |
| 5166 | InterruptType getInterrupt() const { |
| 5167 | return interrupt; |
| 5168 | } |
| 5169 | |
| 5170 | static bool ConvertStrToInterruptType(StringRef Val, InterruptType &Out); |
| 5171 | static const char *ConvertInterruptTypeToStr(InterruptType Val); |
| 5172 | |
| 5173 | |
| 5174 | static bool classof(const Attr *A) { return A->getKind() == attr::MipsInterrupt; } |
| 5175 | }; |
| 5176 | |
| 5177 | class MipsLongCallAttr : public InheritableAttr { |
| 5178 | public: |
| 5179 | enum Spelling { |
| 5180 | GNU_long_call = 0, |
| 5181 | CXX11_gnu_long_call = 1, |
| 5182 | C2x_gnu_long_call = 2, |
| 5183 | GNU_far = 3, |
| 5184 | CXX11_gnu_far = 4, |
| 5185 | C2x_gnu_far = 5, |
| 5186 | SpellingNotCalculated = 15 |
| 5187 | |
| 5188 | }; |
| 5189 | |
| 5190 | // Factory methods |
| 5191 | static MipsLongCallAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5192 | static MipsLongCallAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5193 | static MipsLongCallAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, MipsLongCallAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 5194 | static MipsLongCallAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, MipsLongCallAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 5195 | |
| 5196 | // Constructors |
| 5197 | MipsLongCallAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5198 | ); |
| 5199 | |
| 5200 | MipsLongCallAttr *clone(ASTContext &C) const; |
| 5201 | void printPretty(raw_ostream &OS, |
| 5202 | const PrintingPolicy &Policy) const; |
| 5203 | const char *getSpelling() const; |
| 5204 | Spelling getSemanticSpelling() const; |
| 5205 | |
| 5206 | |
| 5207 | static bool classof(const Attr *A) { return A->getKind() == attr::MipsLongCall; } |
| 5208 | }; |
| 5209 | |
| 5210 | class MipsShortCallAttr : public InheritableAttr { |
| 5211 | public: |
| 5212 | enum Spelling { |
| 5213 | GNU_short_call = 0, |
| 5214 | CXX11_gnu_short_call = 1, |
| 5215 | C2x_gnu_short_call = 2, |
| 5216 | GNU_near = 3, |
| 5217 | CXX11_gnu_near = 4, |
| 5218 | C2x_gnu_near = 5, |
| 5219 | SpellingNotCalculated = 15 |
| 5220 | |
| 5221 | }; |
| 5222 | |
| 5223 | // Factory methods |
| 5224 | static MipsShortCallAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5225 | static MipsShortCallAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5226 | static MipsShortCallAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, MipsShortCallAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 5227 | static MipsShortCallAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, MipsShortCallAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 5228 | |
| 5229 | // Constructors |
| 5230 | MipsShortCallAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5231 | ); |
| 5232 | |
| 5233 | MipsShortCallAttr *clone(ASTContext &C) const; |
| 5234 | void printPretty(raw_ostream &OS, |
| 5235 | const PrintingPolicy &Policy) const; |
| 5236 | const char *getSpelling() const; |
| 5237 | Spelling getSemanticSpelling() const; |
| 5238 | |
| 5239 | |
| 5240 | static bool classof(const Attr *A) { return A->getKind() == attr::MipsShortCall; } |
| 5241 | }; |
| 5242 | |
| 5243 | class ModeAttr : public Attr { |
| 5244 | IdentifierInfo * mode; |
| 5245 | |
| 5246 | public: |
| 5247 | enum Spelling { |
| 5248 | GNU_mode = 0, |
| 5249 | CXX11_gnu_mode = 1, |
| 5250 | C2x_gnu_mode = 2, |
| 5251 | SpellingNotCalculated = 15 |
| 5252 | |
| 5253 | }; |
| 5254 | |
| 5255 | // Factory methods |
| 5256 | static ModeAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Mode, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5257 | static ModeAttr *Create(ASTContext &Ctx, IdentifierInfo * Mode, const AttributeCommonInfo &CommonInfo); |
| 5258 | static ModeAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Mode, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5259 | static ModeAttr *Create(ASTContext &Ctx, IdentifierInfo * Mode, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5260 | |
| 5261 | // Constructors |
| 5262 | ModeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5263 | , IdentifierInfo * Mode |
| 5264 | ); |
| 5265 | |
| 5266 | ModeAttr *clone(ASTContext &C) const; |
| 5267 | void printPretty(raw_ostream &OS, |
| 5268 | const PrintingPolicy &Policy) const; |
| 5269 | const char *getSpelling() const; |
| 5270 | IdentifierInfo * getMode() const { |
| 5271 | return mode; |
| 5272 | } |
| 5273 | |
| 5274 | |
| 5275 | |
| 5276 | static bool classof(const Attr *A) { return A->getKind() == attr::Mode; } |
| 5277 | }; |
| 5278 | |
| 5279 | class NSConsumedAttr : public InheritableParamAttr { |
| 5280 | public: |
| 5281 | enum Spelling { |
| 5282 | GNU_ns_consumed = 0, |
| 5283 | CXX11_clang_ns_consumed = 1, |
| 5284 | C2x_clang_ns_consumed = 2, |
| 5285 | SpellingNotCalculated = 15 |
| 5286 | |
| 5287 | }; |
| 5288 | |
| 5289 | // Factory methods |
| 5290 | static NSConsumedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5291 | static NSConsumedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5292 | static NSConsumedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5293 | static NSConsumedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5294 | |
| 5295 | // Constructors |
| 5296 | NSConsumedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5297 | ); |
| 5298 | |
| 5299 | NSConsumedAttr *clone(ASTContext &C) const; |
| 5300 | void printPretty(raw_ostream &OS, |
| 5301 | const PrintingPolicy &Policy) const; |
| 5302 | const char *getSpelling() const; |
| 5303 | |
| 5304 | |
| 5305 | static bool classof(const Attr *A) { return A->getKind() == attr::NSConsumed; } |
| 5306 | }; |
| 5307 | |
| 5308 | class NSConsumesSelfAttr : public InheritableAttr { |
| 5309 | public: |
| 5310 | enum Spelling { |
| 5311 | GNU_ns_consumes_self = 0, |
| 5312 | CXX11_clang_ns_consumes_self = 1, |
| 5313 | C2x_clang_ns_consumes_self = 2, |
| 5314 | SpellingNotCalculated = 15 |
| 5315 | |
| 5316 | }; |
| 5317 | |
| 5318 | // Factory methods |
| 5319 | static NSConsumesSelfAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5320 | static NSConsumesSelfAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5321 | static NSConsumesSelfAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5322 | static NSConsumesSelfAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5323 | |
| 5324 | // Constructors |
| 5325 | NSConsumesSelfAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5326 | ); |
| 5327 | |
| 5328 | NSConsumesSelfAttr *clone(ASTContext &C) const; |
| 5329 | void printPretty(raw_ostream &OS, |
| 5330 | const PrintingPolicy &Policy) const; |
| 5331 | const char *getSpelling() const; |
| 5332 | |
| 5333 | |
| 5334 | static bool classof(const Attr *A) { return A->getKind() == attr::NSConsumesSelf; } |
| 5335 | }; |
| 5336 | |
| 5337 | class NSErrorDomainAttr : public InheritableAttr { |
| 5338 | VarDecl * errorDomain; |
| 5339 | |
| 5340 | public: |
| 5341 | // Factory methods |
| 5342 | static NSErrorDomainAttr *CreateImplicit(ASTContext &Ctx, VarDecl * ErrorDomain, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5343 | static NSErrorDomainAttr *Create(ASTContext &Ctx, VarDecl * ErrorDomain, const AttributeCommonInfo &CommonInfo); |
| 5344 | static NSErrorDomainAttr *CreateImplicit(ASTContext &Ctx, VarDecl * ErrorDomain, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5345 | static NSErrorDomainAttr *Create(ASTContext &Ctx, VarDecl * ErrorDomain, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5346 | |
| 5347 | // Constructors |
| 5348 | NSErrorDomainAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5349 | , VarDecl * ErrorDomain |
| 5350 | ); |
| 5351 | |
| 5352 | NSErrorDomainAttr *clone(ASTContext &C) const; |
| 5353 | void printPretty(raw_ostream &OS, |
| 5354 | const PrintingPolicy &Policy) const; |
| 5355 | const char *getSpelling() const; |
| 5356 | VarDecl * getErrorDomain() const { |
| 5357 | return errorDomain; |
| 5358 | } |
| 5359 | |
| 5360 | |
| 5361 | |
| 5362 | static bool classof(const Attr *A) { return A->getKind() == attr::NSErrorDomain; } |
| 5363 | }; |
| 5364 | |
| 5365 | class NSReturnsAutoreleasedAttr : public InheritableAttr { |
| 5366 | public: |
| 5367 | enum Spelling { |
| 5368 | GNU_ns_returns_autoreleased = 0, |
| 5369 | CXX11_clang_ns_returns_autoreleased = 1, |
| 5370 | C2x_clang_ns_returns_autoreleased = 2, |
| 5371 | SpellingNotCalculated = 15 |
| 5372 | |
| 5373 | }; |
| 5374 | |
| 5375 | // Factory methods |
| 5376 | static NSReturnsAutoreleasedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5377 | static NSReturnsAutoreleasedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5378 | static NSReturnsAutoreleasedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5379 | static NSReturnsAutoreleasedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5380 | |
| 5381 | // Constructors |
| 5382 | NSReturnsAutoreleasedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5383 | ); |
| 5384 | |
| 5385 | NSReturnsAutoreleasedAttr *clone(ASTContext &C) const; |
| 5386 | void printPretty(raw_ostream &OS, |
| 5387 | const PrintingPolicy &Policy) const; |
| 5388 | const char *getSpelling() const; |
| 5389 | |
| 5390 | |
| 5391 | static bool classof(const Attr *A) { return A->getKind() == attr::NSReturnsAutoreleased; } |
| 5392 | }; |
| 5393 | |
| 5394 | class NSReturnsNotRetainedAttr : public InheritableAttr { |
| 5395 | public: |
| 5396 | enum Spelling { |
| 5397 | GNU_ns_returns_not_retained = 0, |
| 5398 | CXX11_clang_ns_returns_not_retained = 1, |
| 5399 | C2x_clang_ns_returns_not_retained = 2, |
| 5400 | SpellingNotCalculated = 15 |
| 5401 | |
| 5402 | }; |
| 5403 | |
| 5404 | // Factory methods |
| 5405 | static NSReturnsNotRetainedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5406 | static NSReturnsNotRetainedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5407 | static NSReturnsNotRetainedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5408 | static NSReturnsNotRetainedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5409 | |
| 5410 | // Constructors |
| 5411 | NSReturnsNotRetainedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5412 | ); |
| 5413 | |
| 5414 | NSReturnsNotRetainedAttr *clone(ASTContext &C) const; |
| 5415 | void printPretty(raw_ostream &OS, |
| 5416 | const PrintingPolicy &Policy) const; |
| 5417 | const char *getSpelling() const; |
| 5418 | |
| 5419 | |
| 5420 | static bool classof(const Attr *A) { return A->getKind() == attr::NSReturnsNotRetained; } |
| 5421 | }; |
| 5422 | |
| 5423 | class NSReturnsRetainedAttr : public InheritableAttr { |
| 5424 | public: |
| 5425 | enum Spelling { |
| 5426 | GNU_ns_returns_retained = 0, |
| 5427 | CXX11_clang_ns_returns_retained = 1, |
| 5428 | C2x_clang_ns_returns_retained = 2, |
| 5429 | SpellingNotCalculated = 15 |
| 5430 | |
| 5431 | }; |
| 5432 | |
| 5433 | // Factory methods |
| 5434 | static NSReturnsRetainedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5435 | static NSReturnsRetainedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5436 | static NSReturnsRetainedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5437 | static NSReturnsRetainedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5438 | |
| 5439 | // Constructors |
| 5440 | NSReturnsRetainedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5441 | ); |
| 5442 | |
| 5443 | NSReturnsRetainedAttr *clone(ASTContext &C) const; |
| 5444 | void printPretty(raw_ostream &OS, |
| 5445 | const PrintingPolicy &Policy) const; |
| 5446 | const char *getSpelling() const; |
| 5447 | |
| 5448 | |
| 5449 | static bool classof(const Attr *A) { return A->getKind() == attr::NSReturnsRetained; } |
| 5450 | }; |
| 5451 | |
| 5452 | class NakedAttr : public InheritableAttr { |
| 5453 | public: |
| 5454 | enum Spelling { |
| 5455 | GNU_naked = 0, |
| 5456 | CXX11_gnu_naked = 1, |
| 5457 | C2x_gnu_naked = 2, |
| 5458 | Declspec_naked = 3, |
| 5459 | SpellingNotCalculated = 15 |
| 5460 | |
| 5461 | }; |
| 5462 | |
| 5463 | // Factory methods |
| 5464 | static NakedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5465 | static NakedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5466 | static NakedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5467 | static NakedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5468 | |
| 5469 | // Constructors |
| 5470 | NakedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5471 | ); |
| 5472 | |
| 5473 | NakedAttr *clone(ASTContext &C) const; |
| 5474 | void printPretty(raw_ostream &OS, |
| 5475 | const PrintingPolicy &Policy) const; |
| 5476 | const char *getSpelling() const; |
| 5477 | |
| 5478 | |
| 5479 | static bool classof(const Attr *A) { return A->getKind() == attr::Naked; } |
| 5480 | }; |
| 5481 | |
| 5482 | class NoAliasAttr : public InheritableAttr { |
| 5483 | public: |
| 5484 | // Factory methods |
| 5485 | static NoAliasAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5486 | static NoAliasAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5487 | static NoAliasAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5488 | static NoAliasAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5489 | |
| 5490 | // Constructors |
| 5491 | NoAliasAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5492 | ); |
| 5493 | |
| 5494 | NoAliasAttr *clone(ASTContext &C) const; |
| 5495 | void printPretty(raw_ostream &OS, |
| 5496 | const PrintingPolicy &Policy) const; |
| 5497 | const char *getSpelling() const; |
| 5498 | |
| 5499 | |
| 5500 | static bool classof(const Attr *A) { return A->getKind() == attr::NoAlias; } |
| 5501 | }; |
| 5502 | |
| 5503 | class NoBuiltinAttr : public Attr { |
| 5504 | unsigned builtinNames_Size; |
| 5505 | StringRef *builtinNames_; |
| 5506 | |
| 5507 | public: |
| 5508 | enum Spelling { |
| 5509 | GNU_no_builtin = 0, |
| 5510 | CXX11_clang_no_builtin = 1, |
| 5511 | C2x_clang_no_builtin = 2, |
| 5512 | SpellingNotCalculated = 15 |
| 5513 | |
| 5514 | }; |
| 5515 | |
| 5516 | // Factory methods |
| 5517 | static NoBuiltinAttr *CreateImplicit(ASTContext &Ctx, StringRef *BuiltinNames, unsigned BuiltinNamesSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5518 | static NoBuiltinAttr *Create(ASTContext &Ctx, StringRef *BuiltinNames, unsigned BuiltinNamesSize, const AttributeCommonInfo &CommonInfo); |
| 5519 | static NoBuiltinAttr *CreateImplicit(ASTContext &Ctx, StringRef *BuiltinNames, unsigned BuiltinNamesSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5520 | static NoBuiltinAttr *Create(ASTContext &Ctx, StringRef *BuiltinNames, unsigned BuiltinNamesSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5521 | |
| 5522 | // Constructors |
| 5523 | NoBuiltinAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5524 | , StringRef *BuiltinNames, unsigned BuiltinNamesSize |
| 5525 | ); |
| 5526 | NoBuiltinAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5527 | ); |
| 5528 | |
| 5529 | NoBuiltinAttr *clone(ASTContext &C) const; |
| 5530 | void printPretty(raw_ostream &OS, |
| 5531 | const PrintingPolicy &Policy) const; |
| 5532 | const char *getSpelling() const; |
| 5533 | typedef StringRef* builtinNames_iterator; |
| 5534 | builtinNames_iterator builtinNames_begin() const { return builtinNames_; } |
| 5535 | builtinNames_iterator builtinNames_end() const { return builtinNames_ + builtinNames_Size; } |
| 5536 | unsigned builtinNames_size() const { return builtinNames_Size; } |
| 5537 | llvm::iterator_range<builtinNames_iterator> builtinNames() const { return llvm::make_range(builtinNames_begin(), builtinNames_end()); } |
| 5538 | |
| 5539 | |
| 5540 | |
| 5541 | |
| 5542 | static bool classof(const Attr *A) { return A->getKind() == attr::NoBuiltin; } |
| 5543 | }; |
| 5544 | |
| 5545 | class NoCommonAttr : public InheritableAttr { |
| 5546 | public: |
| 5547 | enum Spelling { |
| 5548 | GNU_nocommon = 0, |
| 5549 | CXX11_gnu_nocommon = 1, |
| 5550 | C2x_gnu_nocommon = 2, |
| 5551 | SpellingNotCalculated = 15 |
| 5552 | |
| 5553 | }; |
| 5554 | |
| 5555 | // Factory methods |
| 5556 | static NoCommonAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5557 | static NoCommonAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5558 | static NoCommonAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5559 | static NoCommonAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5560 | |
| 5561 | // Constructors |
| 5562 | NoCommonAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5563 | ); |
| 5564 | |
| 5565 | NoCommonAttr *clone(ASTContext &C) const; |
| 5566 | void printPretty(raw_ostream &OS, |
| 5567 | const PrintingPolicy &Policy) const; |
| 5568 | const char *getSpelling() const; |
| 5569 | |
| 5570 | |
| 5571 | static bool classof(const Attr *A) { return A->getKind() == attr::NoCommon; } |
| 5572 | }; |
| 5573 | |
| 5574 | class NoDebugAttr : public InheritableAttr { |
| 5575 | public: |
| 5576 | enum Spelling { |
| 5577 | GNU_nodebug = 0, |
| 5578 | CXX11_gnu_nodebug = 1, |
| 5579 | C2x_gnu_nodebug = 2, |
| 5580 | SpellingNotCalculated = 15 |
| 5581 | |
| 5582 | }; |
| 5583 | |
| 5584 | // Factory methods |
| 5585 | static NoDebugAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5586 | static NoDebugAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5587 | static NoDebugAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5588 | static NoDebugAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5589 | |
| 5590 | // Constructors |
| 5591 | NoDebugAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5592 | ); |
| 5593 | |
| 5594 | NoDebugAttr *clone(ASTContext &C) const; |
| 5595 | void printPretty(raw_ostream &OS, |
| 5596 | const PrintingPolicy &Policy) const; |
| 5597 | const char *getSpelling() const; |
| 5598 | |
| 5599 | |
| 5600 | static bool classof(const Attr *A) { return A->getKind() == attr::NoDebug; } |
| 5601 | }; |
| 5602 | |
| 5603 | class NoDerefAttr : public TypeAttr { |
| 5604 | public: |
| 5605 | enum Spelling { |
| 5606 | GNU_noderef = 0, |
| 5607 | CXX11_clang_noderef = 1, |
| 5608 | C2x_clang_noderef = 2, |
| 5609 | SpellingNotCalculated = 15 |
| 5610 | |
| 5611 | }; |
| 5612 | |
| 5613 | // Factory methods |
| 5614 | static NoDerefAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5615 | static NoDerefAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5616 | static NoDerefAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5617 | static NoDerefAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5618 | |
| 5619 | // Constructors |
| 5620 | NoDerefAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5621 | ); |
| 5622 | |
| 5623 | NoDerefAttr *clone(ASTContext &C) const; |
| 5624 | void printPretty(raw_ostream &OS, |
| 5625 | const PrintingPolicy &Policy) const; |
| 5626 | const char *getSpelling() const; |
| 5627 | |
| 5628 | |
| 5629 | static bool classof(const Attr *A) { return A->getKind() == attr::NoDeref; } |
| 5630 | }; |
| 5631 | |
| 5632 | class NoDestroyAttr : public InheritableAttr { |
| 5633 | public: |
| 5634 | enum Spelling { |
| 5635 | GNU_no_destroy = 0, |
| 5636 | CXX11_clang_no_destroy = 1, |
| 5637 | SpellingNotCalculated = 15 |
| 5638 | |
| 5639 | }; |
| 5640 | |
| 5641 | // Factory methods |
| 5642 | static NoDestroyAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5643 | static NoDestroyAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5644 | static NoDestroyAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5645 | static NoDestroyAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5646 | |
| 5647 | // Constructors |
| 5648 | NoDestroyAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5649 | ); |
| 5650 | |
| 5651 | NoDestroyAttr *clone(ASTContext &C) const; |
| 5652 | void printPretty(raw_ostream &OS, |
| 5653 | const PrintingPolicy &Policy) const; |
| 5654 | const char *getSpelling() const; |
| 5655 | |
| 5656 | |
| 5657 | static bool classof(const Attr *A) { return A->getKind() == attr::NoDestroy; } |
| 5658 | }; |
| 5659 | |
| 5660 | class NoDuplicateAttr : public InheritableAttr { |
| 5661 | public: |
| 5662 | enum Spelling { |
| 5663 | GNU_noduplicate = 0, |
| 5664 | CXX11_clang_noduplicate = 1, |
| 5665 | C2x_clang_noduplicate = 2, |
| 5666 | SpellingNotCalculated = 15 |
| 5667 | |
| 5668 | }; |
| 5669 | |
| 5670 | // Factory methods |
| 5671 | static NoDuplicateAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5672 | static NoDuplicateAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5673 | static NoDuplicateAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5674 | static NoDuplicateAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5675 | |
| 5676 | // Constructors |
| 5677 | NoDuplicateAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5678 | ); |
| 5679 | |
| 5680 | NoDuplicateAttr *clone(ASTContext &C) const; |
| 5681 | void printPretty(raw_ostream &OS, |
| 5682 | const PrintingPolicy &Policy) const; |
| 5683 | const char *getSpelling() const; |
| 5684 | |
| 5685 | |
| 5686 | static bool classof(const Attr *A) { return A->getKind() == attr::NoDuplicate; } |
| 5687 | }; |
| 5688 | |
| 5689 | class NoEscapeAttr : public Attr { |
| 5690 | public: |
| 5691 | enum Spelling { |
| 5692 | GNU_noescape = 0, |
| 5693 | CXX11_clang_noescape = 1, |
| 5694 | C2x_clang_noescape = 2, |
| 5695 | SpellingNotCalculated = 15 |
| 5696 | |
| 5697 | }; |
| 5698 | |
| 5699 | // Factory methods |
| 5700 | static NoEscapeAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5701 | static NoEscapeAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5702 | static NoEscapeAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5703 | static NoEscapeAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5704 | |
| 5705 | // Constructors |
| 5706 | NoEscapeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5707 | ); |
| 5708 | |
| 5709 | NoEscapeAttr *clone(ASTContext &C) const; |
| 5710 | void printPretty(raw_ostream &OS, |
| 5711 | const PrintingPolicy &Policy) const; |
| 5712 | const char *getSpelling() const; |
| 5713 | |
| 5714 | |
| 5715 | static bool classof(const Attr *A) { return A->getKind() == attr::NoEscape; } |
| 5716 | }; |
| 5717 | |
| 5718 | class NoInlineAttr : public InheritableAttr { |
| 5719 | public: |
| 5720 | enum Spelling { |
| 5721 | GNU_noinline = 0, |
| 5722 | CXX11_gnu_noinline = 1, |
| 5723 | C2x_gnu_noinline = 2, |
| 5724 | Declspec_noinline = 3, |
| 5725 | SpellingNotCalculated = 15 |
| 5726 | |
| 5727 | }; |
| 5728 | |
| 5729 | // Factory methods |
| 5730 | static NoInlineAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5731 | static NoInlineAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5732 | static NoInlineAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5733 | static NoInlineAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5734 | |
| 5735 | // Constructors |
| 5736 | NoInlineAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5737 | ); |
| 5738 | |
| 5739 | NoInlineAttr *clone(ASTContext &C) const; |
| 5740 | void printPretty(raw_ostream &OS, |
| 5741 | const PrintingPolicy &Policy) const; |
| 5742 | const char *getSpelling() const; |
| 5743 | |
| 5744 | |
| 5745 | static bool classof(const Attr *A) { return A->getKind() == attr::NoInline; } |
| 5746 | }; |
| 5747 | |
| 5748 | class NoInstrumentFunctionAttr : public InheritableAttr { |
| 5749 | public: |
| 5750 | enum Spelling { |
| 5751 | GNU_no_instrument_function = 0, |
| 5752 | CXX11_gnu_no_instrument_function = 1, |
| 5753 | C2x_gnu_no_instrument_function = 2, |
| 5754 | SpellingNotCalculated = 15 |
| 5755 | |
| 5756 | }; |
| 5757 | |
| 5758 | // Factory methods |
| 5759 | static NoInstrumentFunctionAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5760 | static NoInstrumentFunctionAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5761 | static NoInstrumentFunctionAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5762 | static NoInstrumentFunctionAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5763 | |
| 5764 | // Constructors |
| 5765 | NoInstrumentFunctionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5766 | ); |
| 5767 | |
| 5768 | NoInstrumentFunctionAttr *clone(ASTContext &C) const; |
| 5769 | void printPretty(raw_ostream &OS, |
| 5770 | const PrintingPolicy &Policy) const; |
| 5771 | const char *getSpelling() const; |
| 5772 | |
| 5773 | |
| 5774 | static bool classof(const Attr *A) { return A->getKind() == attr::NoInstrumentFunction; } |
| 5775 | }; |
| 5776 | |
| 5777 | class NoMergeAttr : public DeclOrStmtAttr { |
| 5778 | public: |
| 5779 | enum Spelling { |
| 5780 | GNU_nomerge = 0, |
| 5781 | CXX11_clang_nomerge = 1, |
| 5782 | C2x_clang_nomerge = 2, |
| 5783 | SpellingNotCalculated = 15 |
| 5784 | |
| 5785 | }; |
| 5786 | |
| 5787 | // Factory methods |
| 5788 | static NoMergeAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5789 | static NoMergeAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5790 | static NoMergeAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5791 | static NoMergeAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5792 | |
| 5793 | // Constructors |
| 5794 | NoMergeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5795 | ); |
| 5796 | |
| 5797 | NoMergeAttr *clone(ASTContext &C) const; |
| 5798 | void printPretty(raw_ostream &OS, |
| 5799 | const PrintingPolicy &Policy) const; |
| 5800 | const char *getSpelling() const; |
| 5801 | |
| 5802 | |
| 5803 | static bool classof(const Attr *A) { return A->getKind() == attr::NoMerge; } |
| 5804 | }; |
| 5805 | |
| 5806 | class NoMicroMipsAttr : public InheritableAttr { |
| 5807 | public: |
| 5808 | enum Spelling { |
| 5809 | GNU_nomicromips = 0, |
| 5810 | CXX11_gnu_nomicromips = 1, |
| 5811 | C2x_gnu_nomicromips = 2, |
| 5812 | SpellingNotCalculated = 15 |
| 5813 | |
| 5814 | }; |
| 5815 | |
| 5816 | // Factory methods |
| 5817 | static NoMicroMipsAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5818 | static NoMicroMipsAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5819 | static NoMicroMipsAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5820 | static NoMicroMipsAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5821 | |
| 5822 | // Constructors |
| 5823 | NoMicroMipsAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5824 | ); |
| 5825 | |
| 5826 | NoMicroMipsAttr *clone(ASTContext &C) const; |
| 5827 | void printPretty(raw_ostream &OS, |
| 5828 | const PrintingPolicy &Policy) const; |
| 5829 | const char *getSpelling() const; |
| 5830 | |
| 5831 | |
| 5832 | static bool classof(const Attr *A) { return A->getKind() == attr::NoMicroMips; } |
| 5833 | }; |
| 5834 | |
| 5835 | class NoMips16Attr : public InheritableAttr { |
| 5836 | public: |
| 5837 | enum Spelling { |
| 5838 | GNU_nomips16 = 0, |
| 5839 | CXX11_gnu_nomips16 = 1, |
| 5840 | C2x_gnu_nomips16 = 2, |
| 5841 | SpellingNotCalculated = 15 |
| 5842 | |
| 5843 | }; |
| 5844 | |
| 5845 | // Factory methods |
| 5846 | static NoMips16Attr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5847 | static NoMips16Attr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5848 | static NoMips16Attr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5849 | static NoMips16Attr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5850 | |
| 5851 | // Constructors |
| 5852 | NoMips16Attr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5853 | ); |
| 5854 | |
| 5855 | NoMips16Attr *clone(ASTContext &C) const; |
| 5856 | void printPretty(raw_ostream &OS, |
| 5857 | const PrintingPolicy &Policy) const; |
| 5858 | const char *getSpelling() const; |
| 5859 | |
| 5860 | |
| 5861 | static bool classof(const Attr *A) { return A->getKind() == attr::NoMips16; } |
| 5862 | }; |
| 5863 | |
| 5864 | class NoReturnAttr : public InheritableAttr { |
| 5865 | public: |
| 5866 | enum Spelling { |
| 5867 | GNU_noreturn = 0, |
| 5868 | CXX11_gnu_noreturn = 1, |
| 5869 | C2x_gnu_noreturn = 2, |
| 5870 | Declspec_noreturn = 3, |
| 5871 | SpellingNotCalculated = 15 |
| 5872 | |
| 5873 | }; |
| 5874 | |
| 5875 | // Factory methods |
| 5876 | static NoReturnAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5877 | static NoReturnAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5878 | static NoReturnAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5879 | static NoReturnAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5880 | |
| 5881 | // Constructors |
| 5882 | NoReturnAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5883 | ); |
| 5884 | |
| 5885 | NoReturnAttr *clone(ASTContext &C) const; |
| 5886 | void printPretty(raw_ostream &OS, |
| 5887 | const PrintingPolicy &Policy) const; |
| 5888 | const char *getSpelling() const; |
| 5889 | |
| 5890 | |
| 5891 | static bool classof(const Attr *A) { return A->getKind() == attr::NoReturn; } |
| 5892 | }; |
| 5893 | |
| 5894 | class NoSanitizeAttr : public InheritableAttr { |
| 5895 | unsigned sanitizers_Size; |
| 5896 | StringRef *sanitizers_; |
| 5897 | |
| 5898 | public: |
| 5899 | enum Spelling { |
| 5900 | GNU_no_sanitize = 0, |
| 5901 | CXX11_clang_no_sanitize = 1, |
| 5902 | C2x_clang_no_sanitize = 2, |
| 5903 | SpellingNotCalculated = 15 |
| 5904 | |
| 5905 | }; |
| 5906 | |
| 5907 | // Factory methods |
| 5908 | static NoSanitizeAttr *CreateImplicit(ASTContext &Ctx, StringRef *Sanitizers, unsigned , const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5909 | static NoSanitizeAttr *Create(ASTContext &Ctx, StringRef *Sanitizers, unsigned , const AttributeCommonInfo &CommonInfo); |
| 5910 | static NoSanitizeAttr *CreateImplicit(ASTContext &Ctx, StringRef *Sanitizers, unsigned , SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5911 | static NoSanitizeAttr *Create(ASTContext &Ctx, StringRef *Sanitizers, unsigned , SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5912 | |
| 5913 | // Constructors |
| 5914 | NoSanitizeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5915 | , StringRef *Sanitizers, unsigned |
| 5916 | ); |
| 5917 | NoSanitizeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5918 | ); |
| 5919 | |
| 5920 | NoSanitizeAttr *clone(ASTContext &C) const; |
| 5921 | void printPretty(raw_ostream &OS, |
| 5922 | const PrintingPolicy &Policy) const; |
| 5923 | const char *getSpelling() const; |
| 5924 | typedef StringRef* sanitizers_iterator; |
| 5925 | sanitizers_iterator sanitizers_begin() const { return sanitizers_; } |
| 5926 | sanitizers_iterator sanitizers_end() const { return sanitizers_ + sanitizers_Size; } |
| 5927 | unsigned sanitizers_size() const { return sanitizers_Size; } |
| 5928 | llvm::iterator_range<sanitizers_iterator> sanitizers() const { return llvm::make_range(sanitizers_begin(), sanitizers_end()); } |
| 5929 | |
| 5930 | |
| 5931 | |
| 5932 | SanitizerMask getMask() const { |
| 5933 | SanitizerMask Mask; |
| 5934 | for (auto SanitizerName : sanitizers()) { |
| 5935 | SanitizerMask ParsedMask = |
| 5936 | parseSanitizerValue(SanitizerName, /*AllowGroups=*/true); |
| 5937 | Mask |= expandSanitizerGroups(ParsedMask); |
| 5938 | } |
| 5939 | return Mask; |
| 5940 | } |
| 5941 | |
| 5942 | |
| 5943 | static bool classof(const Attr *A) { return A->getKind() == attr::NoSanitize; } |
| 5944 | }; |
| 5945 | |
| 5946 | class NoSpeculativeLoadHardeningAttr : public InheritableAttr { |
| 5947 | public: |
| 5948 | enum Spelling { |
| 5949 | GNU_no_speculative_load_hardening = 0, |
| 5950 | CXX11_clang_no_speculative_load_hardening = 1, |
| 5951 | C2x_clang_no_speculative_load_hardening = 2, |
| 5952 | SpellingNotCalculated = 15 |
| 5953 | |
| 5954 | }; |
| 5955 | |
| 5956 | // Factory methods |
| 5957 | static NoSpeculativeLoadHardeningAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5958 | static NoSpeculativeLoadHardeningAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5959 | static NoSpeculativeLoadHardeningAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5960 | static NoSpeculativeLoadHardeningAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5961 | |
| 5962 | // Constructors |
| 5963 | NoSpeculativeLoadHardeningAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5964 | ); |
| 5965 | |
| 5966 | NoSpeculativeLoadHardeningAttr *clone(ASTContext &C) const; |
| 5967 | void printPretty(raw_ostream &OS, |
| 5968 | const PrintingPolicy &Policy) const; |
| 5969 | const char *getSpelling() const; |
| 5970 | |
| 5971 | |
| 5972 | static bool classof(const Attr *A) { return A->getKind() == attr::NoSpeculativeLoadHardening; } |
| 5973 | }; |
| 5974 | |
| 5975 | class NoSplitStackAttr : public InheritableAttr { |
| 5976 | public: |
| 5977 | enum Spelling { |
| 5978 | GNU_no_split_stack = 0, |
| 5979 | CXX11_gnu_no_split_stack = 1, |
| 5980 | C2x_gnu_no_split_stack = 2, |
| 5981 | SpellingNotCalculated = 15 |
| 5982 | |
| 5983 | }; |
| 5984 | |
| 5985 | // Factory methods |
| 5986 | static NoSplitStackAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 5987 | static NoSplitStackAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 5988 | static NoSplitStackAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5989 | static NoSplitStackAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 5990 | |
| 5991 | // Constructors |
| 5992 | NoSplitStackAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 5993 | ); |
| 5994 | |
| 5995 | NoSplitStackAttr *clone(ASTContext &C) const; |
| 5996 | void printPretty(raw_ostream &OS, |
| 5997 | const PrintingPolicy &Policy) const; |
| 5998 | const char *getSpelling() const; |
| 5999 | |
| 6000 | |
| 6001 | static bool classof(const Attr *A) { return A->getKind() == attr::NoSplitStack; } |
| 6002 | }; |
| 6003 | |
| 6004 | class NoStackProtectorAttr : public InheritableAttr { |
| 6005 | public: |
| 6006 | enum Spelling { |
| 6007 | GNU_no_stack_protector = 0, |
| 6008 | CXX11_clang_no_stack_protector = 1, |
| 6009 | C2x_clang_no_stack_protector = 2, |
| 6010 | SpellingNotCalculated = 15 |
| 6011 | |
| 6012 | }; |
| 6013 | |
| 6014 | // Factory methods |
| 6015 | static NoStackProtectorAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6016 | static NoStackProtectorAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6017 | static NoStackProtectorAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6018 | static NoStackProtectorAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6019 | |
| 6020 | // Constructors |
| 6021 | NoStackProtectorAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6022 | ); |
| 6023 | |
| 6024 | NoStackProtectorAttr *clone(ASTContext &C) const; |
| 6025 | void printPretty(raw_ostream &OS, |
| 6026 | const PrintingPolicy &Policy) const; |
| 6027 | const char *getSpelling() const; |
| 6028 | |
| 6029 | |
| 6030 | static bool classof(const Attr *A) { return A->getKind() == attr::NoStackProtector; } |
| 6031 | }; |
| 6032 | |
| 6033 | class NoThreadSafetyAnalysisAttr : public InheritableAttr { |
| 6034 | public: |
| 6035 | enum Spelling { |
| 6036 | GNU_no_thread_safety_analysis = 0, |
| 6037 | CXX11_clang_no_thread_safety_analysis = 1, |
| 6038 | C2x_clang_no_thread_safety_analysis = 2, |
| 6039 | SpellingNotCalculated = 15 |
| 6040 | |
| 6041 | }; |
| 6042 | |
| 6043 | // Factory methods |
| 6044 | static NoThreadSafetyAnalysisAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6045 | static NoThreadSafetyAnalysisAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6046 | static NoThreadSafetyAnalysisAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6047 | static NoThreadSafetyAnalysisAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6048 | |
| 6049 | // Constructors |
| 6050 | NoThreadSafetyAnalysisAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6051 | ); |
| 6052 | |
| 6053 | NoThreadSafetyAnalysisAttr *clone(ASTContext &C) const; |
| 6054 | void printPretty(raw_ostream &OS, |
| 6055 | const PrintingPolicy &Policy) const; |
| 6056 | const char *getSpelling() const; |
| 6057 | |
| 6058 | |
| 6059 | static bool classof(const Attr *A) { return A->getKind() == attr::NoThreadSafetyAnalysis; } |
| 6060 | }; |
| 6061 | |
| 6062 | class NoThrowAttr : public InheritableAttr { |
| 6063 | public: |
| 6064 | enum Spelling { |
| 6065 | GNU_nothrow = 0, |
| 6066 | CXX11_gnu_nothrow = 1, |
| 6067 | C2x_gnu_nothrow = 2, |
| 6068 | Declspec_nothrow = 3, |
| 6069 | SpellingNotCalculated = 15 |
| 6070 | |
| 6071 | }; |
| 6072 | |
| 6073 | // Factory methods |
| 6074 | static NoThrowAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6075 | static NoThrowAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6076 | static NoThrowAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6077 | static NoThrowAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6078 | |
| 6079 | // Constructors |
| 6080 | NoThrowAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6081 | ); |
| 6082 | |
| 6083 | NoThrowAttr *clone(ASTContext &C) const; |
| 6084 | void printPretty(raw_ostream &OS, |
| 6085 | const PrintingPolicy &Policy) const; |
| 6086 | const char *getSpelling() const; |
| 6087 | |
| 6088 | |
| 6089 | static bool classof(const Attr *A) { return A->getKind() == attr::NoThrow; } |
| 6090 | }; |
| 6091 | |
| 6092 | class NoUniqueAddressAttr : public InheritableAttr { |
| 6093 | public: |
| 6094 | // Factory methods |
| 6095 | static NoUniqueAddressAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6096 | static NoUniqueAddressAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6097 | static NoUniqueAddressAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6098 | static NoUniqueAddressAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6099 | |
| 6100 | // Constructors |
| 6101 | NoUniqueAddressAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6102 | ); |
| 6103 | |
| 6104 | NoUniqueAddressAttr *clone(ASTContext &C) const; |
| 6105 | void printPretty(raw_ostream &OS, |
| 6106 | const PrintingPolicy &Policy) const; |
| 6107 | const char *getSpelling() const; |
| 6108 | |
| 6109 | |
| 6110 | static bool classof(const Attr *A) { return A->getKind() == attr::NoUniqueAddress; } |
| 6111 | }; |
| 6112 | |
| 6113 | class NonNullAttr : public InheritableParamAttr { |
| 6114 | unsigned args_Size; |
| 6115 | ParamIdx *args_; |
| 6116 | |
| 6117 | public: |
| 6118 | enum Spelling { |
| 6119 | GNU_nonnull = 0, |
| 6120 | CXX11_gnu_nonnull = 1, |
| 6121 | C2x_gnu_nonnull = 2, |
| 6122 | SpellingNotCalculated = 15 |
| 6123 | |
| 6124 | }; |
| 6125 | |
| 6126 | // Factory methods |
| 6127 | static NonNullAttr *CreateImplicit(ASTContext &Ctx, ParamIdx *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6128 | static NonNullAttr *Create(ASTContext &Ctx, ParamIdx *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 6129 | static NonNullAttr *CreateImplicit(ASTContext &Ctx, ParamIdx *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6130 | static NonNullAttr *Create(ASTContext &Ctx, ParamIdx *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6131 | |
| 6132 | // Constructors |
| 6133 | NonNullAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6134 | , ParamIdx *Args, unsigned ArgsSize |
| 6135 | ); |
| 6136 | NonNullAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6137 | ); |
| 6138 | |
| 6139 | NonNullAttr *clone(ASTContext &C) const; |
| 6140 | void printPretty(raw_ostream &OS, |
| 6141 | const PrintingPolicy &Policy) const; |
| 6142 | const char *getSpelling() const; |
| 6143 | typedef ParamIdx* args_iterator; |
| 6144 | args_iterator args_begin() const { return args_; } |
| 6145 | args_iterator args_end() const { return args_ + args_Size; } |
| 6146 | unsigned args_size() const { return args_Size; } |
| 6147 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 6148 | |
| 6149 | |
| 6150 | |
| 6151 | bool isNonNull(unsigned IdxAST) const { |
| 6152 | if (!args_size()) |
| 6153 | return true; |
| 6154 | return args_end() != std::find_if( |
| 6155 | args_begin(), args_end(), |
| 6156 | [=](const ParamIdx &Idx) { return Idx.getASTIndex() == IdxAST; }); |
| 6157 | } |
| 6158 | |
| 6159 | |
| 6160 | static bool classof(const Attr *A) { return A->getKind() == attr::NonNull; } |
| 6161 | }; |
| 6162 | |
| 6163 | class NotTailCalledAttr : public InheritableAttr { |
| 6164 | public: |
| 6165 | enum Spelling { |
| 6166 | GNU_not_tail_called = 0, |
| 6167 | CXX11_clang_not_tail_called = 1, |
| 6168 | C2x_clang_not_tail_called = 2, |
| 6169 | SpellingNotCalculated = 15 |
| 6170 | |
| 6171 | }; |
| 6172 | |
| 6173 | // Factory methods |
| 6174 | static NotTailCalledAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6175 | static NotTailCalledAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6176 | static NotTailCalledAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6177 | static NotTailCalledAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6178 | |
| 6179 | // Constructors |
| 6180 | NotTailCalledAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6181 | ); |
| 6182 | |
| 6183 | NotTailCalledAttr *clone(ASTContext &C) const; |
| 6184 | void printPretty(raw_ostream &OS, |
| 6185 | const PrintingPolicy &Policy) const; |
| 6186 | const char *getSpelling() const; |
| 6187 | |
| 6188 | |
| 6189 | static bool classof(const Attr *A) { return A->getKind() == attr::NotTailCalled; } |
| 6190 | }; |
| 6191 | |
| 6192 | class OMPAllocateDeclAttr : public InheritableAttr { |
| 6193 | public: |
| 6194 | enum AllocatorTypeTy { |
| 6195 | OMPNullMemAlloc, |
| 6196 | OMPDefaultMemAlloc, |
| 6197 | OMPLargeCapMemAlloc, |
| 6198 | OMPConstMemAlloc, |
| 6199 | OMPHighBWMemAlloc, |
| 6200 | OMPLowLatMemAlloc, |
| 6201 | OMPCGroupMemAlloc, |
| 6202 | OMPPTeamMemAlloc, |
| 6203 | OMPThreadMemAlloc, |
| 6204 | OMPUserDefinedMemAlloc |
| 6205 | }; |
| 6206 | private: |
| 6207 | AllocatorTypeTy allocatorType; |
| 6208 | |
| 6209 | Expr * allocator; |
| 6210 | |
| 6211 | public: |
| 6212 | // Factory methods |
| 6213 | static OMPAllocateDeclAttr *CreateImplicit(ASTContext &Ctx, AllocatorTypeTy AllocatorType, Expr * Allocator, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6214 | static OMPAllocateDeclAttr *Create(ASTContext &Ctx, AllocatorTypeTy AllocatorType, Expr * Allocator, const AttributeCommonInfo &CommonInfo); |
| 6215 | static OMPAllocateDeclAttr *CreateImplicit(ASTContext &Ctx, AllocatorTypeTy AllocatorType, Expr * Allocator, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6216 | static OMPAllocateDeclAttr *Create(ASTContext &Ctx, AllocatorTypeTy AllocatorType, Expr * Allocator, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6217 | |
| 6218 | // Constructors |
| 6219 | OMPAllocateDeclAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6220 | , AllocatorTypeTy AllocatorType |
| 6221 | , Expr * Allocator |
| 6222 | ); |
| 6223 | |
| 6224 | OMPAllocateDeclAttr *clone(ASTContext &C) const; |
| 6225 | void printPretty(raw_ostream &OS, |
| 6226 | const PrintingPolicy &Policy) const; |
| 6227 | const char *getSpelling() const; |
| 6228 | AllocatorTypeTy getAllocatorType() const { |
| 6229 | return allocatorType; |
| 6230 | } |
| 6231 | |
| 6232 | static bool ConvertStrToAllocatorTypeTy(StringRef Val, AllocatorTypeTy &Out); |
| 6233 | static const char *ConvertAllocatorTypeTyToStr(AllocatorTypeTy Val); |
| 6234 | Expr * getAllocator() const { |
| 6235 | return allocator; |
| 6236 | } |
| 6237 | |
| 6238 | |
| 6239 | |
| 6240 | static bool classof(const Attr *A) { return A->getKind() == attr::OMPAllocateDecl; } |
| 6241 | }; |
| 6242 | |
| 6243 | class OMPCaptureKindAttr : public Attr { |
| 6244 | unsigned captureKindVal; |
| 6245 | |
| 6246 | public: |
| 6247 | // Factory methods |
| 6248 | static OMPCaptureKindAttr *CreateImplicit(ASTContext &Ctx, unsigned CaptureKindVal, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6249 | static OMPCaptureKindAttr *Create(ASTContext &Ctx, unsigned CaptureKindVal, const AttributeCommonInfo &CommonInfo); |
| 6250 | static OMPCaptureKindAttr *CreateImplicit(ASTContext &Ctx, unsigned CaptureKindVal, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6251 | static OMPCaptureKindAttr *Create(ASTContext &Ctx, unsigned CaptureKindVal, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6252 | |
| 6253 | // Constructors |
| 6254 | OMPCaptureKindAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6255 | , unsigned CaptureKindVal |
| 6256 | ); |
| 6257 | |
| 6258 | OMPCaptureKindAttr *clone(ASTContext &C) const; |
| 6259 | void printPretty(raw_ostream &OS, |
| 6260 | const PrintingPolicy &Policy) const; |
| 6261 | const char *getSpelling() const; |
| 6262 | unsigned getCaptureKindVal() const { |
| 6263 | return captureKindVal; |
| 6264 | } |
| 6265 | |
| 6266 | |
| 6267 | llvm::omp::Clause getCaptureKind() const { |
| 6268 | return static_cast<llvm::omp::Clause>(getCaptureKindVal()); |
| 6269 | } |
| 6270 | |
| 6271 | |
| 6272 | static bool classof(const Attr *A) { return A->getKind() == attr::OMPCaptureKind; } |
| 6273 | }; |
| 6274 | |
| 6275 | class OMPCaptureNoInitAttr : public InheritableAttr { |
| 6276 | public: |
| 6277 | // Factory methods |
| 6278 | static OMPCaptureNoInitAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6279 | static OMPCaptureNoInitAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6280 | static OMPCaptureNoInitAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6281 | static OMPCaptureNoInitAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6282 | |
| 6283 | // Constructors |
| 6284 | OMPCaptureNoInitAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6285 | ); |
| 6286 | |
| 6287 | OMPCaptureNoInitAttr *clone(ASTContext &C) const; |
| 6288 | void printPretty(raw_ostream &OS, |
| 6289 | const PrintingPolicy &Policy) const; |
| 6290 | const char *getSpelling() const; |
| 6291 | |
| 6292 | |
| 6293 | static bool classof(const Attr *A) { return A->getKind() == attr::OMPCaptureNoInit; } |
| 6294 | }; |
| 6295 | |
| 6296 | class OMPDeclareSimdDeclAttr : public Attr { |
| 6297 | public: |
| 6298 | enum BranchStateTy { |
| 6299 | BS_Undefined, |
| 6300 | BS_Inbranch, |
| 6301 | BS_Notinbranch |
| 6302 | }; |
| 6303 | private: |
| 6304 | BranchStateTy branchState; |
| 6305 | |
| 6306 | Expr * simdlen; |
| 6307 | |
| 6308 | unsigned uniforms_Size; |
| 6309 | Expr * *uniforms_; |
| 6310 | |
| 6311 | unsigned aligneds_Size; |
| 6312 | Expr * *aligneds_; |
| 6313 | |
| 6314 | unsigned alignments_Size; |
| 6315 | Expr * *alignments_; |
| 6316 | |
| 6317 | unsigned linears_Size; |
| 6318 | Expr * *linears_; |
| 6319 | |
| 6320 | unsigned modifiers_Size; |
| 6321 | unsigned *modifiers_; |
| 6322 | |
| 6323 | unsigned steps_Size; |
| 6324 | Expr * *steps_; |
| 6325 | |
| 6326 | public: |
| 6327 | // Factory methods |
| 6328 | static OMPDeclareSimdDeclAttr *CreateImplicit(ASTContext &Ctx, BranchStateTy BranchState, Expr * Simdlen, Expr * *Uniforms, unsigned UniformsSize, Expr * *Aligneds, unsigned AlignedsSize, Expr * *Alignments, unsigned AlignmentsSize, Expr * *Linears, unsigned , unsigned *Modifiers, unsigned , Expr * *Steps, unsigned StepsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6329 | static OMPDeclareSimdDeclAttr *Create(ASTContext &Ctx, BranchStateTy BranchState, Expr * Simdlen, Expr * *Uniforms, unsigned UniformsSize, Expr * *Aligneds, unsigned AlignedsSize, Expr * *Alignments, unsigned AlignmentsSize, Expr * *Linears, unsigned , unsigned *Modifiers, unsigned , Expr * *Steps, unsigned StepsSize, const AttributeCommonInfo &CommonInfo); |
| 6330 | static OMPDeclareSimdDeclAttr *CreateImplicit(ASTContext &Ctx, BranchStateTy BranchState, Expr * Simdlen, Expr * *Uniforms, unsigned UniformsSize, Expr * *Aligneds, unsigned AlignedsSize, Expr * *Alignments, unsigned AlignmentsSize, Expr * *Linears, unsigned , unsigned *Modifiers, unsigned , Expr * *Steps, unsigned StepsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6331 | static OMPDeclareSimdDeclAttr *Create(ASTContext &Ctx, BranchStateTy BranchState, Expr * Simdlen, Expr * *Uniforms, unsigned UniformsSize, Expr * *Aligneds, unsigned AlignedsSize, Expr * *Alignments, unsigned AlignmentsSize, Expr * *Linears, unsigned , unsigned *Modifiers, unsigned , Expr * *Steps, unsigned StepsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6332 | |
| 6333 | // Constructors |
| 6334 | OMPDeclareSimdDeclAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6335 | , BranchStateTy BranchState |
| 6336 | , Expr * Simdlen |
| 6337 | , Expr * *Uniforms, unsigned UniformsSize |
| 6338 | , Expr * *Aligneds, unsigned AlignedsSize |
| 6339 | , Expr * *Alignments, unsigned AlignmentsSize |
| 6340 | , Expr * *Linears, unsigned |
| 6341 | , unsigned *Modifiers, unsigned |
| 6342 | , Expr * *Steps, unsigned StepsSize |
| 6343 | ); |
| 6344 | OMPDeclareSimdDeclAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6345 | , BranchStateTy BranchState |
| 6346 | , Expr * Simdlen |
| 6347 | ); |
| 6348 | |
| 6349 | OMPDeclareSimdDeclAttr *clone(ASTContext &C) const; |
| 6350 | void printPretty(raw_ostream &OS, |
| 6351 | const PrintingPolicy &Policy) const; |
| 6352 | const char *getSpelling() const; |
| 6353 | BranchStateTy getBranchState() const { |
| 6354 | return branchState; |
| 6355 | } |
| 6356 | |
| 6357 | static bool ConvertStrToBranchStateTy(StringRef Val, BranchStateTy &Out); |
| 6358 | static const char *ConvertBranchStateTyToStr(BranchStateTy Val); |
| 6359 | Expr * getSimdlen() const { |
| 6360 | return simdlen; |
| 6361 | } |
| 6362 | |
| 6363 | typedef Expr ** uniforms_iterator; |
| 6364 | uniforms_iterator uniforms_begin() const { return uniforms_; } |
| 6365 | uniforms_iterator uniforms_end() const { return uniforms_ + uniforms_Size; } |
| 6366 | unsigned uniforms_size() const { return uniforms_Size; } |
| 6367 | llvm::iterator_range<uniforms_iterator> uniforms() const { return llvm::make_range(uniforms_begin(), uniforms_end()); } |
| 6368 | |
| 6369 | |
| 6370 | typedef Expr ** aligneds_iterator; |
| 6371 | aligneds_iterator aligneds_begin() const { return aligneds_; } |
| 6372 | aligneds_iterator aligneds_end() const { return aligneds_ + aligneds_Size; } |
| 6373 | unsigned aligneds_size() const { return aligneds_Size; } |
| 6374 | llvm::iterator_range<aligneds_iterator> aligneds() const { return llvm::make_range(aligneds_begin(), aligneds_end()); } |
| 6375 | |
| 6376 | |
| 6377 | typedef Expr ** alignments_iterator; |
| 6378 | alignments_iterator alignments_begin() const { return alignments_; } |
| 6379 | alignments_iterator alignments_end() const { return alignments_ + alignments_Size; } |
| 6380 | unsigned alignments_size() const { return alignments_Size; } |
| 6381 | llvm::iterator_range<alignments_iterator> alignments() const { return llvm::make_range(alignments_begin(), alignments_end()); } |
| 6382 | |
| 6383 | |
| 6384 | typedef Expr ** linears_iterator; |
| 6385 | linears_iterator linears_begin() const { return linears_; } |
| 6386 | linears_iterator linears_end() const { return linears_ + linears_Size; } |
| 6387 | unsigned linears_size() const { return linears_Size; } |
| 6388 | llvm::iterator_range<linears_iterator> linears() const { return llvm::make_range(linears_begin(), linears_end()); } |
| 6389 | |
| 6390 | |
| 6391 | typedef unsigned* modifiers_iterator; |
| 6392 | modifiers_iterator modifiers_begin() const { return modifiers_; } |
| 6393 | modifiers_iterator modifiers_end() const { return modifiers_ + modifiers_Size; } |
| 6394 | unsigned modifiers_size() const { return modifiers_Size; } |
| 6395 | llvm::iterator_range<modifiers_iterator> modifiers() const { return llvm::make_range(modifiers_begin(), modifiers_end()); } |
| 6396 | |
| 6397 | |
| 6398 | typedef Expr ** steps_iterator; |
| 6399 | steps_iterator steps_begin() const { return steps_; } |
| 6400 | steps_iterator steps_end() const { return steps_ + steps_Size; } |
| 6401 | unsigned steps_size() const { return steps_Size; } |
| 6402 | llvm::iterator_range<steps_iterator> steps() const { return llvm::make_range(steps_begin(), steps_end()); } |
| 6403 | |
| 6404 | |
| 6405 | |
| 6406 | void printPrettyPragma(raw_ostream & OS, const PrintingPolicy &Policy) |
| 6407 | const; |
| 6408 | |
| 6409 | |
| 6410 | static bool classof(const Attr *A) { return A->getKind() == attr::OMPDeclareSimdDecl; } |
| 6411 | }; |
| 6412 | |
| 6413 | class OMPDeclareTargetDeclAttr : public InheritableAttr { |
| 6414 | public: |
| 6415 | enum MapTypeTy { |
| 6416 | MT_To, |
| 6417 | MT_Link |
| 6418 | }; |
| 6419 | private: |
| 6420 | MapTypeTy mapType; |
| 6421 | |
| 6422 | public: |
| 6423 | enum DevTypeTy { |
| 6424 | DT_Host, |
| 6425 | DT_NoHost, |
| 6426 | DT_Any |
| 6427 | }; |
| 6428 | private: |
| 6429 | DevTypeTy devType; |
| 6430 | |
| 6431 | unsigned level; |
| 6432 | |
| 6433 | public: |
| 6434 | // Factory methods |
| 6435 | static OMPDeclareTargetDeclAttr *CreateImplicit(ASTContext &Ctx, MapTypeTy MapType, DevTypeTy DevType, unsigned Level, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6436 | static OMPDeclareTargetDeclAttr *Create(ASTContext &Ctx, MapTypeTy MapType, DevTypeTy DevType, unsigned Level, const AttributeCommonInfo &CommonInfo); |
| 6437 | static OMPDeclareTargetDeclAttr *CreateImplicit(ASTContext &Ctx, MapTypeTy MapType, DevTypeTy DevType, unsigned Level, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6438 | static OMPDeclareTargetDeclAttr *Create(ASTContext &Ctx, MapTypeTy MapType, DevTypeTy DevType, unsigned Level, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6439 | |
| 6440 | // Constructors |
| 6441 | OMPDeclareTargetDeclAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6442 | , MapTypeTy MapType |
| 6443 | , DevTypeTy DevType |
| 6444 | , unsigned Level |
| 6445 | ); |
| 6446 | |
| 6447 | OMPDeclareTargetDeclAttr *clone(ASTContext &C) const; |
| 6448 | void printPretty(raw_ostream &OS, |
| 6449 | const PrintingPolicy &Policy) const; |
| 6450 | const char *getSpelling() const; |
| 6451 | MapTypeTy getMapType() const { |
| 6452 | return mapType; |
| 6453 | } |
| 6454 | |
| 6455 | static bool ConvertStrToMapTypeTy(StringRef Val, MapTypeTy &Out); |
| 6456 | static const char *ConvertMapTypeTyToStr(MapTypeTy Val); |
| 6457 | DevTypeTy getDevType() const { |
| 6458 | return devType; |
| 6459 | } |
| 6460 | |
| 6461 | static bool ConvertStrToDevTypeTy(StringRef Val, DevTypeTy &Out); |
| 6462 | static const char *ConvertDevTypeTyToStr(DevTypeTy Val); |
| 6463 | unsigned getLevel() const { |
| 6464 | return level; |
| 6465 | } |
| 6466 | |
| 6467 | |
| 6468 | void printPrettyPragma(raw_ostream &OS, const PrintingPolicy &Policy) const; |
| 6469 | static llvm::Optional<MapTypeTy> |
| 6470 | isDeclareTargetDeclaration(const ValueDecl *VD); |
| 6471 | static llvm::Optional<DevTypeTy> getDeviceType(const ValueDecl *VD); |
| 6472 | static llvm::Optional<SourceLocation> getLocation(const ValueDecl *VD); |
| 6473 | |
| 6474 | |
| 6475 | static bool classof(const Attr *A) { return A->getKind() == attr::OMPDeclareTargetDecl; } |
| 6476 | }; |
| 6477 | |
| 6478 | class OMPDeclareVariantAttr : public InheritableAttr { |
| 6479 | Expr * variantFuncRef; |
| 6480 | |
| 6481 | OMPTraitInfo * traitInfos; |
| 6482 | |
| 6483 | public: |
| 6484 | // Factory methods |
| 6485 | static OMPDeclareVariantAttr *CreateImplicit(ASTContext &Ctx, Expr * VariantFuncRef, OMPTraitInfo * TraitInfos, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6486 | static OMPDeclareVariantAttr *Create(ASTContext &Ctx, Expr * VariantFuncRef, OMPTraitInfo * TraitInfos, const AttributeCommonInfo &CommonInfo); |
| 6487 | static OMPDeclareVariantAttr *CreateImplicit(ASTContext &Ctx, Expr * VariantFuncRef, OMPTraitInfo * TraitInfos, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6488 | static OMPDeclareVariantAttr *Create(ASTContext &Ctx, Expr * VariantFuncRef, OMPTraitInfo * TraitInfos, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6489 | |
| 6490 | // Constructors |
| 6491 | OMPDeclareVariantAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6492 | , Expr * VariantFuncRef |
| 6493 | , OMPTraitInfo * TraitInfos |
| 6494 | ); |
| 6495 | |
| 6496 | OMPDeclareVariantAttr *clone(ASTContext &C) const; |
| 6497 | void printPretty(raw_ostream &OS, |
| 6498 | const PrintingPolicy &Policy) const; |
| 6499 | const char *getSpelling() const; |
| 6500 | Expr * getVariantFuncRef() const { |
| 6501 | return variantFuncRef; |
| 6502 | } |
| 6503 | |
| 6504 | OMPTraitInfo * getTraitInfos() const { |
| 6505 | return traitInfos; |
| 6506 | } |
| 6507 | |
| 6508 | |
| 6509 | OMPTraitInfo &getTraitInfo() { return *traitInfos; } |
| 6510 | void printPrettyPragma(raw_ostream & OS, const PrintingPolicy &Policy) |
| 6511 | const; |
| 6512 | |
| 6513 | |
| 6514 | static bool classof(const Attr *A) { return A->getKind() == attr::OMPDeclareVariant; } |
| 6515 | }; |
| 6516 | |
| 6517 | class OMPReferencedVarAttr : public Attr { |
| 6518 | Expr * ref; |
| 6519 | |
| 6520 | public: |
| 6521 | // Factory methods |
| 6522 | static OMPReferencedVarAttr *CreateImplicit(ASTContext &Ctx, Expr * Ref, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6523 | static OMPReferencedVarAttr *Create(ASTContext &Ctx, Expr * Ref, const AttributeCommonInfo &CommonInfo); |
| 6524 | static OMPReferencedVarAttr *CreateImplicit(ASTContext &Ctx, Expr * Ref, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6525 | static OMPReferencedVarAttr *Create(ASTContext &Ctx, Expr * Ref, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6526 | |
| 6527 | // Constructors |
| 6528 | OMPReferencedVarAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6529 | , Expr * Ref |
| 6530 | ); |
| 6531 | |
| 6532 | OMPReferencedVarAttr *clone(ASTContext &C) const; |
| 6533 | void printPretty(raw_ostream &OS, |
| 6534 | const PrintingPolicy &Policy) const; |
| 6535 | const char *getSpelling() const; |
| 6536 | Expr * getRef() const { |
| 6537 | return ref; |
| 6538 | } |
| 6539 | |
| 6540 | |
| 6541 | |
| 6542 | static bool classof(const Attr *A) { return A->getKind() == attr::OMPReferencedVar; } |
| 6543 | }; |
| 6544 | |
| 6545 | class OMPThreadPrivateDeclAttr : public InheritableAttr { |
| 6546 | public: |
| 6547 | // Factory methods |
| 6548 | static OMPThreadPrivateDeclAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6549 | static OMPThreadPrivateDeclAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6550 | static OMPThreadPrivateDeclAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6551 | static OMPThreadPrivateDeclAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6552 | |
| 6553 | // Constructors |
| 6554 | OMPThreadPrivateDeclAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6555 | ); |
| 6556 | |
| 6557 | OMPThreadPrivateDeclAttr *clone(ASTContext &C) const; |
| 6558 | void printPretty(raw_ostream &OS, |
| 6559 | const PrintingPolicy &Policy) const; |
| 6560 | const char *getSpelling() const; |
| 6561 | |
| 6562 | |
| 6563 | static bool classof(const Attr *A) { return A->getKind() == attr::OMPThreadPrivateDecl; } |
| 6564 | }; |
| 6565 | |
| 6566 | class OSConsumedAttr : public InheritableParamAttr { |
| 6567 | public: |
| 6568 | enum Spelling { |
| 6569 | GNU_os_consumed = 0, |
| 6570 | CXX11_clang_os_consumed = 1, |
| 6571 | C2x_clang_os_consumed = 2, |
| 6572 | SpellingNotCalculated = 15 |
| 6573 | |
| 6574 | }; |
| 6575 | |
| 6576 | // Factory methods |
| 6577 | static OSConsumedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6578 | static OSConsumedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6579 | static OSConsumedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6580 | static OSConsumedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6581 | |
| 6582 | // Constructors |
| 6583 | OSConsumedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6584 | ); |
| 6585 | |
| 6586 | OSConsumedAttr *clone(ASTContext &C) const; |
| 6587 | void printPretty(raw_ostream &OS, |
| 6588 | const PrintingPolicy &Policy) const; |
| 6589 | const char *getSpelling() const; |
| 6590 | |
| 6591 | |
| 6592 | static bool classof(const Attr *A) { return A->getKind() == attr::OSConsumed; } |
| 6593 | }; |
| 6594 | |
| 6595 | class OSConsumesThisAttr : public InheritableAttr { |
| 6596 | public: |
| 6597 | enum Spelling { |
| 6598 | GNU_os_consumes_this = 0, |
| 6599 | CXX11_clang_os_consumes_this = 1, |
| 6600 | C2x_clang_os_consumes_this = 2, |
| 6601 | SpellingNotCalculated = 15 |
| 6602 | |
| 6603 | }; |
| 6604 | |
| 6605 | // Factory methods |
| 6606 | static OSConsumesThisAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6607 | static OSConsumesThisAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6608 | static OSConsumesThisAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6609 | static OSConsumesThisAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6610 | |
| 6611 | // Constructors |
| 6612 | OSConsumesThisAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6613 | ); |
| 6614 | |
| 6615 | OSConsumesThisAttr *clone(ASTContext &C) const; |
| 6616 | void printPretty(raw_ostream &OS, |
| 6617 | const PrintingPolicy &Policy) const; |
| 6618 | const char *getSpelling() const; |
| 6619 | |
| 6620 | |
| 6621 | static bool classof(const Attr *A) { return A->getKind() == attr::OSConsumesThis; } |
| 6622 | }; |
| 6623 | |
| 6624 | class OSReturnsNotRetainedAttr : public InheritableAttr { |
| 6625 | public: |
| 6626 | enum Spelling { |
| 6627 | GNU_os_returns_not_retained = 0, |
| 6628 | CXX11_clang_os_returns_not_retained = 1, |
| 6629 | C2x_clang_os_returns_not_retained = 2, |
| 6630 | SpellingNotCalculated = 15 |
| 6631 | |
| 6632 | }; |
| 6633 | |
| 6634 | // Factory methods |
| 6635 | static OSReturnsNotRetainedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6636 | static OSReturnsNotRetainedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6637 | static OSReturnsNotRetainedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6638 | static OSReturnsNotRetainedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6639 | |
| 6640 | // Constructors |
| 6641 | OSReturnsNotRetainedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6642 | ); |
| 6643 | |
| 6644 | OSReturnsNotRetainedAttr *clone(ASTContext &C) const; |
| 6645 | void printPretty(raw_ostream &OS, |
| 6646 | const PrintingPolicy &Policy) const; |
| 6647 | const char *getSpelling() const; |
| 6648 | |
| 6649 | |
| 6650 | static bool classof(const Attr *A) { return A->getKind() == attr::OSReturnsNotRetained; } |
| 6651 | }; |
| 6652 | |
| 6653 | class OSReturnsRetainedAttr : public InheritableAttr { |
| 6654 | public: |
| 6655 | enum Spelling { |
| 6656 | GNU_os_returns_retained = 0, |
| 6657 | CXX11_clang_os_returns_retained = 1, |
| 6658 | C2x_clang_os_returns_retained = 2, |
| 6659 | SpellingNotCalculated = 15 |
| 6660 | |
| 6661 | }; |
| 6662 | |
| 6663 | // Factory methods |
| 6664 | static OSReturnsRetainedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6665 | static OSReturnsRetainedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6666 | static OSReturnsRetainedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6667 | static OSReturnsRetainedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6668 | |
| 6669 | // Constructors |
| 6670 | OSReturnsRetainedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6671 | ); |
| 6672 | |
| 6673 | OSReturnsRetainedAttr *clone(ASTContext &C) const; |
| 6674 | void printPretty(raw_ostream &OS, |
| 6675 | const PrintingPolicy &Policy) const; |
| 6676 | const char *getSpelling() const; |
| 6677 | |
| 6678 | |
| 6679 | static bool classof(const Attr *A) { return A->getKind() == attr::OSReturnsRetained; } |
| 6680 | }; |
| 6681 | |
| 6682 | class OSReturnsRetainedOnNonZeroAttr : public InheritableAttr { |
| 6683 | public: |
| 6684 | enum Spelling { |
| 6685 | GNU_os_returns_retained_on_non_zero = 0, |
| 6686 | CXX11_clang_os_returns_retained_on_non_zero = 1, |
| 6687 | C2x_clang_os_returns_retained_on_non_zero = 2, |
| 6688 | SpellingNotCalculated = 15 |
| 6689 | |
| 6690 | }; |
| 6691 | |
| 6692 | // Factory methods |
| 6693 | static OSReturnsRetainedOnNonZeroAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6694 | static OSReturnsRetainedOnNonZeroAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6695 | static OSReturnsRetainedOnNonZeroAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6696 | static OSReturnsRetainedOnNonZeroAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6697 | |
| 6698 | // Constructors |
| 6699 | OSReturnsRetainedOnNonZeroAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6700 | ); |
| 6701 | |
| 6702 | OSReturnsRetainedOnNonZeroAttr *clone(ASTContext &C) const; |
| 6703 | void printPretty(raw_ostream &OS, |
| 6704 | const PrintingPolicy &Policy) const; |
| 6705 | const char *getSpelling() const; |
| 6706 | |
| 6707 | |
| 6708 | static bool classof(const Attr *A) { return A->getKind() == attr::OSReturnsRetainedOnNonZero; } |
| 6709 | }; |
| 6710 | |
| 6711 | class OSReturnsRetainedOnZeroAttr : public InheritableAttr { |
| 6712 | public: |
| 6713 | enum Spelling { |
| 6714 | GNU_os_returns_retained_on_zero = 0, |
| 6715 | CXX11_clang_os_returns_retained_on_zero = 1, |
| 6716 | C2x_clang_os_returns_retained_on_zero = 2, |
| 6717 | SpellingNotCalculated = 15 |
| 6718 | |
| 6719 | }; |
| 6720 | |
| 6721 | // Factory methods |
| 6722 | static OSReturnsRetainedOnZeroAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6723 | static OSReturnsRetainedOnZeroAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6724 | static OSReturnsRetainedOnZeroAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6725 | static OSReturnsRetainedOnZeroAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6726 | |
| 6727 | // Constructors |
| 6728 | OSReturnsRetainedOnZeroAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6729 | ); |
| 6730 | |
| 6731 | OSReturnsRetainedOnZeroAttr *clone(ASTContext &C) const; |
| 6732 | void printPretty(raw_ostream &OS, |
| 6733 | const PrintingPolicy &Policy) const; |
| 6734 | const char *getSpelling() const; |
| 6735 | |
| 6736 | |
| 6737 | static bool classof(const Attr *A) { return A->getKind() == attr::OSReturnsRetainedOnZero; } |
| 6738 | }; |
| 6739 | |
| 6740 | class ObjCBoxableAttr : public Attr { |
| 6741 | public: |
| 6742 | enum Spelling { |
| 6743 | GNU_objc_boxable = 0, |
| 6744 | CXX11_clang_objc_boxable = 1, |
| 6745 | C2x_clang_objc_boxable = 2, |
| 6746 | SpellingNotCalculated = 15 |
| 6747 | |
| 6748 | }; |
| 6749 | |
| 6750 | // Factory methods |
| 6751 | static ObjCBoxableAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6752 | static ObjCBoxableAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6753 | static ObjCBoxableAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6754 | static ObjCBoxableAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6755 | |
| 6756 | // Constructors |
| 6757 | ObjCBoxableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6758 | ); |
| 6759 | |
| 6760 | ObjCBoxableAttr *clone(ASTContext &C) const; |
| 6761 | void printPretty(raw_ostream &OS, |
| 6762 | const PrintingPolicy &Policy) const; |
| 6763 | const char *getSpelling() const; |
| 6764 | |
| 6765 | |
| 6766 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCBoxable; } |
| 6767 | }; |
| 6768 | |
| 6769 | class ObjCBridgeAttr : public InheritableAttr { |
| 6770 | IdentifierInfo * bridgedType; |
| 6771 | |
| 6772 | public: |
| 6773 | enum Spelling { |
| 6774 | GNU_objc_bridge = 0, |
| 6775 | CXX11_clang_objc_bridge = 1, |
| 6776 | C2x_clang_objc_bridge = 2, |
| 6777 | SpellingNotCalculated = 15 |
| 6778 | |
| 6779 | }; |
| 6780 | |
| 6781 | // Factory methods |
| 6782 | static ObjCBridgeAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * BridgedType, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6783 | static ObjCBridgeAttr *Create(ASTContext &Ctx, IdentifierInfo * BridgedType, const AttributeCommonInfo &CommonInfo); |
| 6784 | static ObjCBridgeAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * BridgedType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6785 | static ObjCBridgeAttr *Create(ASTContext &Ctx, IdentifierInfo * BridgedType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6786 | |
| 6787 | // Constructors |
| 6788 | ObjCBridgeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6789 | , IdentifierInfo * BridgedType |
| 6790 | ); |
| 6791 | |
| 6792 | ObjCBridgeAttr *clone(ASTContext &C) const; |
| 6793 | void printPretty(raw_ostream &OS, |
| 6794 | const PrintingPolicy &Policy) const; |
| 6795 | const char *getSpelling() const; |
| 6796 | IdentifierInfo * getBridgedType() const { |
| 6797 | return bridgedType; |
| 6798 | } |
| 6799 | |
| 6800 | |
| 6801 | |
| 6802 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCBridge; } |
| 6803 | }; |
| 6804 | |
| 6805 | class ObjCBridgeMutableAttr : public InheritableAttr { |
| 6806 | IdentifierInfo * bridgedType; |
| 6807 | |
| 6808 | public: |
| 6809 | enum Spelling { |
| 6810 | GNU_objc_bridge_mutable = 0, |
| 6811 | CXX11_clang_objc_bridge_mutable = 1, |
| 6812 | C2x_clang_objc_bridge_mutable = 2, |
| 6813 | SpellingNotCalculated = 15 |
| 6814 | |
| 6815 | }; |
| 6816 | |
| 6817 | // Factory methods |
| 6818 | static ObjCBridgeMutableAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * BridgedType, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6819 | static ObjCBridgeMutableAttr *Create(ASTContext &Ctx, IdentifierInfo * BridgedType, const AttributeCommonInfo &CommonInfo); |
| 6820 | static ObjCBridgeMutableAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * BridgedType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6821 | static ObjCBridgeMutableAttr *Create(ASTContext &Ctx, IdentifierInfo * BridgedType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6822 | |
| 6823 | // Constructors |
| 6824 | ObjCBridgeMutableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6825 | , IdentifierInfo * BridgedType |
| 6826 | ); |
| 6827 | |
| 6828 | ObjCBridgeMutableAttr *clone(ASTContext &C) const; |
| 6829 | void printPretty(raw_ostream &OS, |
| 6830 | const PrintingPolicy &Policy) const; |
| 6831 | const char *getSpelling() const; |
| 6832 | IdentifierInfo * getBridgedType() const { |
| 6833 | return bridgedType; |
| 6834 | } |
| 6835 | |
| 6836 | |
| 6837 | |
| 6838 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCBridgeMutable; } |
| 6839 | }; |
| 6840 | |
| 6841 | class ObjCBridgeRelatedAttr : public InheritableAttr { |
| 6842 | IdentifierInfo * relatedClass; |
| 6843 | |
| 6844 | IdentifierInfo * classMethod; |
| 6845 | |
| 6846 | IdentifierInfo * instanceMethod; |
| 6847 | |
| 6848 | public: |
| 6849 | enum Spelling { |
| 6850 | GNU_objc_bridge_related = 0, |
| 6851 | CXX11_clang_objc_bridge_related = 1, |
| 6852 | C2x_clang_objc_bridge_related = 2, |
| 6853 | SpellingNotCalculated = 15 |
| 6854 | |
| 6855 | }; |
| 6856 | |
| 6857 | // Factory methods |
| 6858 | static ObjCBridgeRelatedAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * RelatedClass, IdentifierInfo * ClassMethod, IdentifierInfo * InstanceMethod, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6859 | static ObjCBridgeRelatedAttr *Create(ASTContext &Ctx, IdentifierInfo * RelatedClass, IdentifierInfo * ClassMethod, IdentifierInfo * InstanceMethod, const AttributeCommonInfo &CommonInfo); |
| 6860 | static ObjCBridgeRelatedAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * RelatedClass, IdentifierInfo * ClassMethod, IdentifierInfo * InstanceMethod, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6861 | static ObjCBridgeRelatedAttr *Create(ASTContext &Ctx, IdentifierInfo * RelatedClass, IdentifierInfo * ClassMethod, IdentifierInfo * InstanceMethod, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6862 | |
| 6863 | // Constructors |
| 6864 | ObjCBridgeRelatedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6865 | , IdentifierInfo * RelatedClass |
| 6866 | , IdentifierInfo * ClassMethod |
| 6867 | , IdentifierInfo * InstanceMethod |
| 6868 | ); |
| 6869 | |
| 6870 | ObjCBridgeRelatedAttr *clone(ASTContext &C) const; |
| 6871 | void printPretty(raw_ostream &OS, |
| 6872 | const PrintingPolicy &Policy) const; |
| 6873 | const char *getSpelling() const; |
| 6874 | IdentifierInfo * getRelatedClass() const { |
| 6875 | return relatedClass; |
| 6876 | } |
| 6877 | |
| 6878 | IdentifierInfo * getClassMethod() const { |
| 6879 | return classMethod; |
| 6880 | } |
| 6881 | |
| 6882 | IdentifierInfo * getInstanceMethod() const { |
| 6883 | return instanceMethod; |
| 6884 | } |
| 6885 | |
| 6886 | |
| 6887 | |
| 6888 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCBridgeRelated; } |
| 6889 | }; |
| 6890 | |
| 6891 | class ObjCClassStubAttr : public Attr { |
| 6892 | public: |
| 6893 | enum Spelling { |
| 6894 | GNU_objc_class_stub = 0, |
| 6895 | CXX11_clang_objc_class_stub = 1, |
| 6896 | C2x_clang_objc_class_stub = 2, |
| 6897 | SpellingNotCalculated = 15 |
| 6898 | |
| 6899 | }; |
| 6900 | |
| 6901 | // Factory methods |
| 6902 | static ObjCClassStubAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6903 | static ObjCClassStubAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6904 | static ObjCClassStubAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6905 | static ObjCClassStubAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6906 | |
| 6907 | // Constructors |
| 6908 | ObjCClassStubAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6909 | ); |
| 6910 | |
| 6911 | ObjCClassStubAttr *clone(ASTContext &C) const; |
| 6912 | void printPretty(raw_ostream &OS, |
| 6913 | const PrintingPolicy &Policy) const; |
| 6914 | const char *getSpelling() const; |
| 6915 | |
| 6916 | |
| 6917 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCClassStub; } |
| 6918 | }; |
| 6919 | |
| 6920 | class ObjCDesignatedInitializerAttr : public Attr { |
| 6921 | public: |
| 6922 | enum Spelling { |
| 6923 | GNU_objc_designated_initializer = 0, |
| 6924 | CXX11_clang_objc_designated_initializer = 1, |
| 6925 | C2x_clang_objc_designated_initializer = 2, |
| 6926 | SpellingNotCalculated = 15 |
| 6927 | |
| 6928 | }; |
| 6929 | |
| 6930 | // Factory methods |
| 6931 | static ObjCDesignatedInitializerAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6932 | static ObjCDesignatedInitializerAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6933 | static ObjCDesignatedInitializerAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6934 | static ObjCDesignatedInitializerAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6935 | |
| 6936 | // Constructors |
| 6937 | ObjCDesignatedInitializerAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6938 | ); |
| 6939 | |
| 6940 | ObjCDesignatedInitializerAttr *clone(ASTContext &C) const; |
| 6941 | void printPretty(raw_ostream &OS, |
| 6942 | const PrintingPolicy &Policy) const; |
| 6943 | const char *getSpelling() const; |
| 6944 | |
| 6945 | |
| 6946 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCDesignatedInitializer; } |
| 6947 | }; |
| 6948 | |
| 6949 | class ObjCDirectAttr : public Attr { |
| 6950 | public: |
| 6951 | enum Spelling { |
| 6952 | GNU_objc_direct = 0, |
| 6953 | CXX11_clang_objc_direct = 1, |
| 6954 | C2x_clang_objc_direct = 2, |
| 6955 | SpellingNotCalculated = 15 |
| 6956 | |
| 6957 | }; |
| 6958 | |
| 6959 | // Factory methods |
| 6960 | static ObjCDirectAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6961 | static ObjCDirectAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6962 | static ObjCDirectAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6963 | static ObjCDirectAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6964 | |
| 6965 | // Constructors |
| 6966 | ObjCDirectAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6967 | ); |
| 6968 | |
| 6969 | ObjCDirectAttr *clone(ASTContext &C) const; |
| 6970 | void printPretty(raw_ostream &OS, |
| 6971 | const PrintingPolicy &Policy) const; |
| 6972 | const char *getSpelling() const; |
| 6973 | |
| 6974 | |
| 6975 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCDirect; } |
| 6976 | }; |
| 6977 | |
| 6978 | class ObjCDirectMembersAttr : public Attr { |
| 6979 | public: |
| 6980 | enum Spelling { |
| 6981 | GNU_objc_direct_members = 0, |
| 6982 | CXX11_clang_objc_direct_members = 1, |
| 6983 | C2x_clang_objc_direct_members = 2, |
| 6984 | SpellingNotCalculated = 15 |
| 6985 | |
| 6986 | }; |
| 6987 | |
| 6988 | // Factory methods |
| 6989 | static ObjCDirectMembersAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 6990 | static ObjCDirectMembersAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 6991 | static ObjCDirectMembersAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6992 | static ObjCDirectMembersAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 6993 | |
| 6994 | // Constructors |
| 6995 | ObjCDirectMembersAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 6996 | ); |
| 6997 | |
| 6998 | ObjCDirectMembersAttr *clone(ASTContext &C) const; |
| 6999 | void printPretty(raw_ostream &OS, |
| 7000 | const PrintingPolicy &Policy) const; |
| 7001 | const char *getSpelling() const; |
| 7002 | |
| 7003 | |
| 7004 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCDirectMembers; } |
| 7005 | }; |
| 7006 | |
| 7007 | class ObjCExceptionAttr : public InheritableAttr { |
| 7008 | public: |
| 7009 | enum Spelling { |
| 7010 | GNU_objc_exception = 0, |
| 7011 | CXX11_clang_objc_exception = 1, |
| 7012 | C2x_clang_objc_exception = 2, |
| 7013 | SpellingNotCalculated = 15 |
| 7014 | |
| 7015 | }; |
| 7016 | |
| 7017 | // Factory methods |
| 7018 | static ObjCExceptionAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7019 | static ObjCExceptionAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7020 | static ObjCExceptionAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7021 | static ObjCExceptionAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7022 | |
| 7023 | // Constructors |
| 7024 | ObjCExceptionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7025 | ); |
| 7026 | |
| 7027 | ObjCExceptionAttr *clone(ASTContext &C) const; |
| 7028 | void printPretty(raw_ostream &OS, |
| 7029 | const PrintingPolicy &Policy) const; |
| 7030 | const char *getSpelling() const; |
| 7031 | |
| 7032 | |
| 7033 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCException; } |
| 7034 | }; |
| 7035 | |
| 7036 | class ObjCExplicitProtocolImplAttr : public InheritableAttr { |
| 7037 | public: |
| 7038 | enum Spelling { |
| 7039 | GNU_objc_protocol_requires_explicit_implementation = 0, |
| 7040 | CXX11_clang_objc_protocol_requires_explicit_implementation = 1, |
| 7041 | C2x_clang_objc_protocol_requires_explicit_implementation = 2, |
| 7042 | SpellingNotCalculated = 15 |
| 7043 | |
| 7044 | }; |
| 7045 | |
| 7046 | // Factory methods |
| 7047 | static ObjCExplicitProtocolImplAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7048 | static ObjCExplicitProtocolImplAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7049 | static ObjCExplicitProtocolImplAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7050 | static ObjCExplicitProtocolImplAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7051 | |
| 7052 | // Constructors |
| 7053 | ObjCExplicitProtocolImplAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7054 | ); |
| 7055 | |
| 7056 | ObjCExplicitProtocolImplAttr *clone(ASTContext &C) const; |
| 7057 | void printPretty(raw_ostream &OS, |
| 7058 | const PrintingPolicy &Policy) const; |
| 7059 | const char *getSpelling() const; |
| 7060 | |
| 7061 | |
| 7062 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCExplicitProtocolImpl; } |
| 7063 | }; |
| 7064 | |
| 7065 | class ObjCExternallyRetainedAttr : public InheritableAttr { |
| 7066 | public: |
| 7067 | enum Spelling { |
| 7068 | GNU_objc_externally_retained = 0, |
| 7069 | CXX11_clang_objc_externally_retained = 1, |
| 7070 | C2x_clang_objc_externally_retained = 2, |
| 7071 | SpellingNotCalculated = 15 |
| 7072 | |
| 7073 | }; |
| 7074 | |
| 7075 | // Factory methods |
| 7076 | static ObjCExternallyRetainedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7077 | static ObjCExternallyRetainedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7078 | static ObjCExternallyRetainedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7079 | static ObjCExternallyRetainedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7080 | |
| 7081 | // Constructors |
| 7082 | ObjCExternallyRetainedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7083 | ); |
| 7084 | |
| 7085 | ObjCExternallyRetainedAttr *clone(ASTContext &C) const; |
| 7086 | void printPretty(raw_ostream &OS, |
| 7087 | const PrintingPolicy &Policy) const; |
| 7088 | const char *getSpelling() const; |
| 7089 | |
| 7090 | |
| 7091 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCExternallyRetained; } |
| 7092 | }; |
| 7093 | |
| 7094 | class ObjCGCAttr : public TypeAttr { |
| 7095 | IdentifierInfo * kind; |
| 7096 | |
| 7097 | public: |
| 7098 | enum Spelling { |
| 7099 | GNU_objc_gc = 0, |
| 7100 | CXX11_clang_objc_gc = 1, |
| 7101 | C2x_clang_objc_gc = 2, |
| 7102 | SpellingNotCalculated = 15 |
| 7103 | |
| 7104 | }; |
| 7105 | |
| 7106 | // Factory methods |
| 7107 | static ObjCGCAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Kind, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7108 | static ObjCGCAttr *Create(ASTContext &Ctx, IdentifierInfo * Kind, const AttributeCommonInfo &CommonInfo); |
| 7109 | static ObjCGCAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Kind, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7110 | static ObjCGCAttr *Create(ASTContext &Ctx, IdentifierInfo * Kind, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7111 | |
| 7112 | // Constructors |
| 7113 | ObjCGCAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7114 | , IdentifierInfo * Kind |
| 7115 | ); |
| 7116 | |
| 7117 | ObjCGCAttr *clone(ASTContext &C) const; |
| 7118 | void printPretty(raw_ostream &OS, |
| 7119 | const PrintingPolicy &Policy) const; |
| 7120 | const char *getSpelling() const; |
| 7121 | IdentifierInfo * getKind() const { |
| 7122 | return kind; |
| 7123 | } |
| 7124 | |
| 7125 | |
| 7126 | |
| 7127 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCGC; } |
| 7128 | }; |
| 7129 | |
| 7130 | class ObjCIndependentClassAttr : public InheritableAttr { |
| 7131 | public: |
| 7132 | enum Spelling { |
| 7133 | GNU_objc_independent_class = 0, |
| 7134 | CXX11_clang_objc_independent_class = 1, |
| 7135 | C2x_clang_objc_independent_class = 2, |
| 7136 | SpellingNotCalculated = 15 |
| 7137 | |
| 7138 | }; |
| 7139 | |
| 7140 | // Factory methods |
| 7141 | static ObjCIndependentClassAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7142 | static ObjCIndependentClassAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7143 | static ObjCIndependentClassAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7144 | static ObjCIndependentClassAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7145 | |
| 7146 | // Constructors |
| 7147 | ObjCIndependentClassAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7148 | ); |
| 7149 | |
| 7150 | ObjCIndependentClassAttr *clone(ASTContext &C) const; |
| 7151 | void printPretty(raw_ostream &OS, |
| 7152 | const PrintingPolicy &Policy) const; |
| 7153 | const char *getSpelling() const; |
| 7154 | |
| 7155 | |
| 7156 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCIndependentClass; } |
| 7157 | }; |
| 7158 | |
| 7159 | class ObjCInertUnsafeUnretainedAttr : public TypeAttr { |
| 7160 | public: |
| 7161 | // Factory methods |
| 7162 | static ObjCInertUnsafeUnretainedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7163 | static ObjCInertUnsafeUnretainedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7164 | static ObjCInertUnsafeUnretainedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7165 | static ObjCInertUnsafeUnretainedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7166 | |
| 7167 | // Constructors |
| 7168 | ObjCInertUnsafeUnretainedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7169 | ); |
| 7170 | |
| 7171 | ObjCInertUnsafeUnretainedAttr *clone(ASTContext &C) const; |
| 7172 | void printPretty(raw_ostream &OS, |
| 7173 | const PrintingPolicy &Policy) const; |
| 7174 | const char *getSpelling() const; |
| 7175 | |
| 7176 | |
| 7177 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCInertUnsafeUnretained; } |
| 7178 | }; |
| 7179 | |
| 7180 | class ObjCKindOfAttr : public TypeAttr { |
| 7181 | public: |
| 7182 | // Factory methods |
| 7183 | static ObjCKindOfAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7184 | static ObjCKindOfAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7185 | static ObjCKindOfAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7186 | static ObjCKindOfAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7187 | |
| 7188 | // Constructors |
| 7189 | ObjCKindOfAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7190 | ); |
| 7191 | |
| 7192 | ObjCKindOfAttr *clone(ASTContext &C) const; |
| 7193 | void printPretty(raw_ostream &OS, |
| 7194 | const PrintingPolicy &Policy) const; |
| 7195 | const char *getSpelling() const; |
| 7196 | |
| 7197 | |
| 7198 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCKindOf; } |
| 7199 | }; |
| 7200 | |
| 7201 | class ObjCMethodFamilyAttr : public InheritableAttr { |
| 7202 | public: |
| 7203 | enum FamilyKind { |
| 7204 | OMF_None, |
| 7205 | OMF_alloc, |
| 7206 | OMF_copy, |
| 7207 | OMF_init, |
| 7208 | OMF_mutableCopy, |
| 7209 | OMF_new |
| 7210 | }; |
| 7211 | private: |
| 7212 | FamilyKind family; |
| 7213 | |
| 7214 | public: |
| 7215 | enum Spelling { |
| 7216 | GNU_objc_method_family = 0, |
| 7217 | CXX11_clang_objc_method_family = 1, |
| 7218 | C2x_clang_objc_method_family = 2, |
| 7219 | SpellingNotCalculated = 15 |
| 7220 | |
| 7221 | }; |
| 7222 | |
| 7223 | // Factory methods |
| 7224 | static ObjCMethodFamilyAttr *CreateImplicit(ASTContext &Ctx, FamilyKind Family, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7225 | static ObjCMethodFamilyAttr *Create(ASTContext &Ctx, FamilyKind Family, const AttributeCommonInfo &CommonInfo); |
| 7226 | static ObjCMethodFamilyAttr *CreateImplicit(ASTContext &Ctx, FamilyKind Family, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7227 | static ObjCMethodFamilyAttr *Create(ASTContext &Ctx, FamilyKind Family, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7228 | |
| 7229 | // Constructors |
| 7230 | ObjCMethodFamilyAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7231 | , FamilyKind Family |
| 7232 | ); |
| 7233 | |
| 7234 | ObjCMethodFamilyAttr *clone(ASTContext &C) const; |
| 7235 | void printPretty(raw_ostream &OS, |
| 7236 | const PrintingPolicy &Policy) const; |
| 7237 | const char *getSpelling() const; |
| 7238 | FamilyKind getFamily() const { |
| 7239 | return family; |
| 7240 | } |
| 7241 | |
| 7242 | static bool ConvertStrToFamilyKind(StringRef Val, FamilyKind &Out); |
| 7243 | static const char *ConvertFamilyKindToStr(FamilyKind Val); |
| 7244 | |
| 7245 | |
| 7246 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCMethodFamily; } |
| 7247 | }; |
| 7248 | |
| 7249 | class ObjCNSObjectAttr : public InheritableAttr { |
| 7250 | public: |
| 7251 | enum Spelling { |
| 7252 | GNU_NSObject = 0, |
| 7253 | CXX11_clang_NSObject = 1, |
| 7254 | C2x_clang_NSObject = 2, |
| 7255 | SpellingNotCalculated = 15 |
| 7256 | |
| 7257 | }; |
| 7258 | |
| 7259 | // Factory methods |
| 7260 | static ObjCNSObjectAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7261 | static ObjCNSObjectAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7262 | static ObjCNSObjectAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7263 | static ObjCNSObjectAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7264 | |
| 7265 | // Constructors |
| 7266 | ObjCNSObjectAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7267 | ); |
| 7268 | |
| 7269 | ObjCNSObjectAttr *clone(ASTContext &C) const; |
| 7270 | void printPretty(raw_ostream &OS, |
| 7271 | const PrintingPolicy &Policy) const; |
| 7272 | const char *getSpelling() const; |
| 7273 | |
| 7274 | |
| 7275 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCNSObject; } |
| 7276 | }; |
| 7277 | |
| 7278 | class ObjCNonLazyClassAttr : public Attr { |
| 7279 | public: |
| 7280 | enum Spelling { |
| 7281 | GNU_objc_nonlazy_class = 0, |
| 7282 | CXX11_clang_objc_nonlazy_class = 1, |
| 7283 | C2x_clang_objc_nonlazy_class = 2, |
| 7284 | SpellingNotCalculated = 15 |
| 7285 | |
| 7286 | }; |
| 7287 | |
| 7288 | // Factory methods |
| 7289 | static ObjCNonLazyClassAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7290 | static ObjCNonLazyClassAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7291 | static ObjCNonLazyClassAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7292 | static ObjCNonLazyClassAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7293 | |
| 7294 | // Constructors |
| 7295 | ObjCNonLazyClassAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7296 | ); |
| 7297 | |
| 7298 | ObjCNonLazyClassAttr *clone(ASTContext &C) const; |
| 7299 | void printPretty(raw_ostream &OS, |
| 7300 | const PrintingPolicy &Policy) const; |
| 7301 | const char *getSpelling() const; |
| 7302 | |
| 7303 | |
| 7304 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCNonLazyClass; } |
| 7305 | }; |
| 7306 | |
| 7307 | class ObjCNonRuntimeProtocolAttr : public Attr { |
| 7308 | public: |
| 7309 | enum Spelling { |
| 7310 | GNU_objc_non_runtime_protocol = 0, |
| 7311 | CXX11_clang_objc_non_runtime_protocol = 1, |
| 7312 | C2x_clang_objc_non_runtime_protocol = 2, |
| 7313 | SpellingNotCalculated = 15 |
| 7314 | |
| 7315 | }; |
| 7316 | |
| 7317 | // Factory methods |
| 7318 | static ObjCNonRuntimeProtocolAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7319 | static ObjCNonRuntimeProtocolAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7320 | static ObjCNonRuntimeProtocolAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7321 | static ObjCNonRuntimeProtocolAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7322 | |
| 7323 | // Constructors |
| 7324 | ObjCNonRuntimeProtocolAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7325 | ); |
| 7326 | |
| 7327 | ObjCNonRuntimeProtocolAttr *clone(ASTContext &C) const; |
| 7328 | void printPretty(raw_ostream &OS, |
| 7329 | const PrintingPolicy &Policy) const; |
| 7330 | const char *getSpelling() const; |
| 7331 | |
| 7332 | |
| 7333 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCNonRuntimeProtocol; } |
| 7334 | }; |
| 7335 | |
| 7336 | class ObjCOwnershipAttr : public InheritableAttr { |
| 7337 | IdentifierInfo * kind; |
| 7338 | |
| 7339 | public: |
| 7340 | enum Spelling { |
| 7341 | GNU_objc_ownership = 0, |
| 7342 | CXX11_clang_objc_ownership = 1, |
| 7343 | C2x_clang_objc_ownership = 2, |
| 7344 | SpellingNotCalculated = 15 |
| 7345 | |
| 7346 | }; |
| 7347 | |
| 7348 | // Factory methods |
| 7349 | static ObjCOwnershipAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Kind, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7350 | static ObjCOwnershipAttr *Create(ASTContext &Ctx, IdentifierInfo * Kind, const AttributeCommonInfo &CommonInfo); |
| 7351 | static ObjCOwnershipAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Kind, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7352 | static ObjCOwnershipAttr *Create(ASTContext &Ctx, IdentifierInfo * Kind, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7353 | |
| 7354 | // Constructors |
| 7355 | ObjCOwnershipAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7356 | , IdentifierInfo * Kind |
| 7357 | ); |
| 7358 | |
| 7359 | ObjCOwnershipAttr *clone(ASTContext &C) const; |
| 7360 | void printPretty(raw_ostream &OS, |
| 7361 | const PrintingPolicy &Policy) const; |
| 7362 | const char *getSpelling() const; |
| 7363 | IdentifierInfo * getKind() const { |
| 7364 | return kind; |
| 7365 | } |
| 7366 | |
| 7367 | |
| 7368 | |
| 7369 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCOwnership; } |
| 7370 | }; |
| 7371 | |
| 7372 | class ObjCPreciseLifetimeAttr : public InheritableAttr { |
| 7373 | public: |
| 7374 | enum Spelling { |
| 7375 | GNU_objc_precise_lifetime = 0, |
| 7376 | CXX11_clang_objc_precise_lifetime = 1, |
| 7377 | C2x_clang_objc_precise_lifetime = 2, |
| 7378 | SpellingNotCalculated = 15 |
| 7379 | |
| 7380 | }; |
| 7381 | |
| 7382 | // Factory methods |
| 7383 | static ObjCPreciseLifetimeAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7384 | static ObjCPreciseLifetimeAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7385 | static ObjCPreciseLifetimeAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7386 | static ObjCPreciseLifetimeAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7387 | |
| 7388 | // Constructors |
| 7389 | ObjCPreciseLifetimeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7390 | ); |
| 7391 | |
| 7392 | ObjCPreciseLifetimeAttr *clone(ASTContext &C) const; |
| 7393 | void printPretty(raw_ostream &OS, |
| 7394 | const PrintingPolicy &Policy) const; |
| 7395 | const char *getSpelling() const; |
| 7396 | |
| 7397 | |
| 7398 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCPreciseLifetime; } |
| 7399 | }; |
| 7400 | |
| 7401 | class ObjCRequiresPropertyDefsAttr : public InheritableAttr { |
| 7402 | public: |
| 7403 | enum Spelling { |
| 7404 | GNU_objc_requires_property_definitions = 0, |
| 7405 | CXX11_clang_objc_requires_property_definitions = 1, |
| 7406 | C2x_clang_objc_requires_property_definitions = 2, |
| 7407 | SpellingNotCalculated = 15 |
| 7408 | |
| 7409 | }; |
| 7410 | |
| 7411 | // Factory methods |
| 7412 | static ObjCRequiresPropertyDefsAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7413 | static ObjCRequiresPropertyDefsAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7414 | static ObjCRequiresPropertyDefsAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7415 | static ObjCRequiresPropertyDefsAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7416 | |
| 7417 | // Constructors |
| 7418 | ObjCRequiresPropertyDefsAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7419 | ); |
| 7420 | |
| 7421 | ObjCRequiresPropertyDefsAttr *clone(ASTContext &C) const; |
| 7422 | void printPretty(raw_ostream &OS, |
| 7423 | const PrintingPolicy &Policy) const; |
| 7424 | const char *getSpelling() const; |
| 7425 | |
| 7426 | |
| 7427 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCRequiresPropertyDefs; } |
| 7428 | }; |
| 7429 | |
| 7430 | class ObjCRequiresSuperAttr : public InheritableAttr { |
| 7431 | public: |
| 7432 | enum Spelling { |
| 7433 | GNU_objc_requires_super = 0, |
| 7434 | CXX11_clang_objc_requires_super = 1, |
| 7435 | C2x_clang_objc_requires_super = 2, |
| 7436 | SpellingNotCalculated = 15 |
| 7437 | |
| 7438 | }; |
| 7439 | |
| 7440 | // Factory methods |
| 7441 | static ObjCRequiresSuperAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7442 | static ObjCRequiresSuperAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7443 | static ObjCRequiresSuperAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7444 | static ObjCRequiresSuperAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7445 | |
| 7446 | // Constructors |
| 7447 | ObjCRequiresSuperAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7448 | ); |
| 7449 | |
| 7450 | ObjCRequiresSuperAttr *clone(ASTContext &C) const; |
| 7451 | void printPretty(raw_ostream &OS, |
| 7452 | const PrintingPolicy &Policy) const; |
| 7453 | const char *getSpelling() const; |
| 7454 | |
| 7455 | |
| 7456 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCRequiresSuper; } |
| 7457 | }; |
| 7458 | |
| 7459 | class ObjCReturnsInnerPointerAttr : public InheritableAttr { |
| 7460 | public: |
| 7461 | enum Spelling { |
| 7462 | GNU_objc_returns_inner_pointer = 0, |
| 7463 | CXX11_clang_objc_returns_inner_pointer = 1, |
| 7464 | C2x_clang_objc_returns_inner_pointer = 2, |
| 7465 | SpellingNotCalculated = 15 |
| 7466 | |
| 7467 | }; |
| 7468 | |
| 7469 | // Factory methods |
| 7470 | static ObjCReturnsInnerPointerAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7471 | static ObjCReturnsInnerPointerAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7472 | static ObjCReturnsInnerPointerAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7473 | static ObjCReturnsInnerPointerAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7474 | |
| 7475 | // Constructors |
| 7476 | ObjCReturnsInnerPointerAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7477 | ); |
| 7478 | |
| 7479 | ObjCReturnsInnerPointerAttr *clone(ASTContext &C) const; |
| 7480 | void printPretty(raw_ostream &OS, |
| 7481 | const PrintingPolicy &Policy) const; |
| 7482 | const char *getSpelling() const; |
| 7483 | |
| 7484 | |
| 7485 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCReturnsInnerPointer; } |
| 7486 | }; |
| 7487 | |
| 7488 | class ObjCRootClassAttr : public InheritableAttr { |
| 7489 | public: |
| 7490 | enum Spelling { |
| 7491 | GNU_objc_root_class = 0, |
| 7492 | CXX11_clang_objc_root_class = 1, |
| 7493 | C2x_clang_objc_root_class = 2, |
| 7494 | SpellingNotCalculated = 15 |
| 7495 | |
| 7496 | }; |
| 7497 | |
| 7498 | // Factory methods |
| 7499 | static ObjCRootClassAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7500 | static ObjCRootClassAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7501 | static ObjCRootClassAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7502 | static ObjCRootClassAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7503 | |
| 7504 | // Constructors |
| 7505 | ObjCRootClassAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7506 | ); |
| 7507 | |
| 7508 | ObjCRootClassAttr *clone(ASTContext &C) const; |
| 7509 | void printPretty(raw_ostream &OS, |
| 7510 | const PrintingPolicy &Policy) const; |
| 7511 | const char *getSpelling() const; |
| 7512 | |
| 7513 | |
| 7514 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCRootClass; } |
| 7515 | }; |
| 7516 | |
| 7517 | class ObjCRuntimeNameAttr : public Attr { |
| 7518 | unsigned metadataNameLength; |
| 7519 | char *metadataName; |
| 7520 | |
| 7521 | public: |
| 7522 | enum Spelling { |
| 7523 | GNU_objc_runtime_name = 0, |
| 7524 | CXX11_clang_objc_runtime_name = 1, |
| 7525 | C2x_clang_objc_runtime_name = 2, |
| 7526 | SpellingNotCalculated = 15 |
| 7527 | |
| 7528 | }; |
| 7529 | |
| 7530 | // Factory methods |
| 7531 | static ObjCRuntimeNameAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef MetadataName, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7532 | static ObjCRuntimeNameAttr *Create(ASTContext &Ctx, llvm::StringRef MetadataName, const AttributeCommonInfo &CommonInfo); |
| 7533 | static ObjCRuntimeNameAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef MetadataName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7534 | static ObjCRuntimeNameAttr *Create(ASTContext &Ctx, llvm::StringRef MetadataName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7535 | |
| 7536 | // Constructors |
| 7537 | ObjCRuntimeNameAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7538 | , llvm::StringRef MetadataName |
| 7539 | ); |
| 7540 | |
| 7541 | ObjCRuntimeNameAttr *clone(ASTContext &C) const; |
| 7542 | void printPretty(raw_ostream &OS, |
| 7543 | const PrintingPolicy &Policy) const; |
| 7544 | const char *getSpelling() const; |
| 7545 | llvm::StringRef getMetadataName() const { |
| 7546 | return llvm::StringRef(metadataName, metadataNameLength); |
| 7547 | } |
| 7548 | unsigned getMetadataNameLength() const { |
| 7549 | return metadataNameLength; |
| 7550 | } |
| 7551 | void setMetadataName(ASTContext &C, llvm::StringRef S) { |
| 7552 | metadataNameLength = S.size(); |
| 7553 | this->metadataName = new (C, 1) char [metadataNameLength]; |
| 7554 | if (!S.empty()) |
| 7555 | std::memcpy(this->metadataName, S.data(), metadataNameLength); |
| 7556 | } |
| 7557 | |
| 7558 | |
| 7559 | |
| 7560 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCRuntimeName; } |
| 7561 | }; |
| 7562 | |
| 7563 | class ObjCRuntimeVisibleAttr : public Attr { |
| 7564 | public: |
| 7565 | enum Spelling { |
| 7566 | GNU_objc_runtime_visible = 0, |
| 7567 | CXX11_clang_objc_runtime_visible = 1, |
| 7568 | C2x_clang_objc_runtime_visible = 2, |
| 7569 | SpellingNotCalculated = 15 |
| 7570 | |
| 7571 | }; |
| 7572 | |
| 7573 | // Factory methods |
| 7574 | static ObjCRuntimeVisibleAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7575 | static ObjCRuntimeVisibleAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7576 | static ObjCRuntimeVisibleAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7577 | static ObjCRuntimeVisibleAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7578 | |
| 7579 | // Constructors |
| 7580 | ObjCRuntimeVisibleAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7581 | ); |
| 7582 | |
| 7583 | ObjCRuntimeVisibleAttr *clone(ASTContext &C) const; |
| 7584 | void printPretty(raw_ostream &OS, |
| 7585 | const PrintingPolicy &Policy) const; |
| 7586 | const char *getSpelling() const; |
| 7587 | |
| 7588 | |
| 7589 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCRuntimeVisible; } |
| 7590 | }; |
| 7591 | |
| 7592 | class ObjCSubclassingRestrictedAttr : public InheritableAttr { |
| 7593 | public: |
| 7594 | enum Spelling { |
| 7595 | GNU_objc_subclassing_restricted = 0, |
| 7596 | CXX11_clang_objc_subclassing_restricted = 1, |
| 7597 | C2x_clang_objc_subclassing_restricted = 2, |
| 7598 | SpellingNotCalculated = 15 |
| 7599 | |
| 7600 | }; |
| 7601 | |
| 7602 | // Factory methods |
| 7603 | static ObjCSubclassingRestrictedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7604 | static ObjCSubclassingRestrictedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7605 | static ObjCSubclassingRestrictedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7606 | static ObjCSubclassingRestrictedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7607 | |
| 7608 | // Constructors |
| 7609 | ObjCSubclassingRestrictedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7610 | ); |
| 7611 | |
| 7612 | ObjCSubclassingRestrictedAttr *clone(ASTContext &C) const; |
| 7613 | void printPretty(raw_ostream &OS, |
| 7614 | const PrintingPolicy &Policy) const; |
| 7615 | const char *getSpelling() const; |
| 7616 | |
| 7617 | |
| 7618 | static bool classof(const Attr *A) { return A->getKind() == attr::ObjCSubclassingRestricted; } |
| 7619 | }; |
| 7620 | |
| 7621 | class OpenCLAccessAttr : public Attr { |
| 7622 | public: |
| 7623 | enum Spelling { |
| 7624 | Keyword_read_only = 0, |
| 7625 | Keyword_write_only = 2, |
| 7626 | Keyword_read_write = 4, |
| 7627 | SpellingNotCalculated = 15 |
| 7628 | |
| 7629 | }; |
| 7630 | |
| 7631 | // Factory methods |
| 7632 | static OpenCLAccessAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7633 | static OpenCLAccessAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7634 | static OpenCLAccessAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLAccessAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7635 | static OpenCLAccessAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLAccessAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7636 | |
| 7637 | // Constructors |
| 7638 | OpenCLAccessAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7639 | ); |
| 7640 | |
| 7641 | OpenCLAccessAttr *clone(ASTContext &C) const; |
| 7642 | void printPretty(raw_ostream &OS, |
| 7643 | const PrintingPolicy &Policy) const; |
| 7644 | const char *getSpelling() const; |
| 7645 | Spelling getSemanticSpelling() const; |
| 7646 | bool isReadOnly() const { return getAttributeSpellingListIndex() == 0 || |
| 7647 | getAttributeSpellingListIndex() == 1; } |
| 7648 | bool isReadWrite() const { return getAttributeSpellingListIndex() == 4 || |
| 7649 | getAttributeSpellingListIndex() == 5; } |
| 7650 | bool isWriteOnly() const { return getAttributeSpellingListIndex() == 2 || |
| 7651 | getAttributeSpellingListIndex() == 3; } |
| 7652 | |
| 7653 | |
| 7654 | static bool classof(const Attr *A) { return A->getKind() == attr::OpenCLAccess; } |
| 7655 | }; |
| 7656 | |
| 7657 | class OpenCLConstantAddressSpaceAttr : public TypeAttr { |
| 7658 | public: |
| 7659 | enum Spelling { |
| 7660 | Keyword_constant = 0, |
| 7661 | GNU_opencl_constant = 2, |
| 7662 | CXX11_clang_opencl_constant = 3, |
| 7663 | C2x_clang_opencl_constant = 4, |
| 7664 | SpellingNotCalculated = 15 |
| 7665 | |
| 7666 | }; |
| 7667 | |
| 7668 | // Factory methods |
| 7669 | static OpenCLConstantAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7670 | static OpenCLConstantAddressSpaceAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7671 | static OpenCLConstantAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLConstantAddressSpaceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7672 | static OpenCLConstantAddressSpaceAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLConstantAddressSpaceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7673 | |
| 7674 | // Constructors |
| 7675 | OpenCLConstantAddressSpaceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7676 | ); |
| 7677 | |
| 7678 | OpenCLConstantAddressSpaceAttr *clone(ASTContext &C) const; |
| 7679 | void printPretty(raw_ostream &OS, |
| 7680 | const PrintingPolicy &Policy) const; |
| 7681 | const char *getSpelling() const; |
| 7682 | Spelling getSemanticSpelling() const; |
| 7683 | |
| 7684 | |
| 7685 | static bool classof(const Attr *A) { return A->getKind() == attr::OpenCLConstantAddressSpace; } |
| 7686 | }; |
| 7687 | |
| 7688 | class OpenCLGenericAddressSpaceAttr : public TypeAttr { |
| 7689 | public: |
| 7690 | enum Spelling { |
| 7691 | Keyword_generic = 0, |
| 7692 | GNU_opencl_generic = 2, |
| 7693 | CXX11_clang_opencl_generic = 3, |
| 7694 | C2x_clang_opencl_generic = 4, |
| 7695 | SpellingNotCalculated = 15 |
| 7696 | |
| 7697 | }; |
| 7698 | |
| 7699 | // Factory methods |
| 7700 | static OpenCLGenericAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7701 | static OpenCLGenericAddressSpaceAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7702 | static OpenCLGenericAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLGenericAddressSpaceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7703 | static OpenCLGenericAddressSpaceAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLGenericAddressSpaceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7704 | |
| 7705 | // Constructors |
| 7706 | OpenCLGenericAddressSpaceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7707 | ); |
| 7708 | |
| 7709 | OpenCLGenericAddressSpaceAttr *clone(ASTContext &C) const; |
| 7710 | void printPretty(raw_ostream &OS, |
| 7711 | const PrintingPolicy &Policy) const; |
| 7712 | const char *getSpelling() const; |
| 7713 | Spelling getSemanticSpelling() const; |
| 7714 | |
| 7715 | |
| 7716 | static bool classof(const Attr *A) { return A->getKind() == attr::OpenCLGenericAddressSpace; } |
| 7717 | }; |
| 7718 | |
| 7719 | class OpenCLGlobalAddressSpaceAttr : public TypeAttr { |
| 7720 | public: |
| 7721 | enum Spelling { |
| 7722 | Keyword_global = 0, |
| 7723 | GNU_opencl_global = 2, |
| 7724 | CXX11_clang_opencl_global = 3, |
| 7725 | C2x_clang_opencl_global = 4, |
| 7726 | SpellingNotCalculated = 15 |
| 7727 | |
| 7728 | }; |
| 7729 | |
| 7730 | // Factory methods |
| 7731 | static OpenCLGlobalAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7732 | static OpenCLGlobalAddressSpaceAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7733 | static OpenCLGlobalAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLGlobalAddressSpaceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7734 | static OpenCLGlobalAddressSpaceAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLGlobalAddressSpaceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7735 | |
| 7736 | // Constructors |
| 7737 | OpenCLGlobalAddressSpaceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7738 | ); |
| 7739 | |
| 7740 | OpenCLGlobalAddressSpaceAttr *clone(ASTContext &C) const; |
| 7741 | void printPretty(raw_ostream &OS, |
| 7742 | const PrintingPolicy &Policy) const; |
| 7743 | const char *getSpelling() const; |
| 7744 | Spelling getSemanticSpelling() const; |
| 7745 | |
| 7746 | |
| 7747 | static bool classof(const Attr *A) { return A->getKind() == attr::OpenCLGlobalAddressSpace; } |
| 7748 | }; |
| 7749 | |
| 7750 | class OpenCLGlobalDeviceAddressSpaceAttr : public TypeAttr { |
| 7751 | public: |
| 7752 | enum Spelling { |
| 7753 | GNU_opencl_global_device = 0, |
| 7754 | CXX11_clang_opencl_global_device = 1, |
| 7755 | C2x_clang_opencl_global_device = 2, |
| 7756 | SpellingNotCalculated = 15 |
| 7757 | |
| 7758 | }; |
| 7759 | |
| 7760 | // Factory methods |
| 7761 | static OpenCLGlobalDeviceAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7762 | static OpenCLGlobalDeviceAddressSpaceAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7763 | static OpenCLGlobalDeviceAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7764 | static OpenCLGlobalDeviceAddressSpaceAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7765 | |
| 7766 | // Constructors |
| 7767 | OpenCLGlobalDeviceAddressSpaceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7768 | ); |
| 7769 | |
| 7770 | OpenCLGlobalDeviceAddressSpaceAttr *clone(ASTContext &C) const; |
| 7771 | void printPretty(raw_ostream &OS, |
| 7772 | const PrintingPolicy &Policy) const; |
| 7773 | const char *getSpelling() const; |
| 7774 | |
| 7775 | |
| 7776 | static bool classof(const Attr *A) { return A->getKind() == attr::OpenCLGlobalDeviceAddressSpace; } |
| 7777 | }; |
| 7778 | |
| 7779 | class OpenCLGlobalHostAddressSpaceAttr : public TypeAttr { |
| 7780 | public: |
| 7781 | enum Spelling { |
| 7782 | GNU_opencl_global_host = 0, |
| 7783 | CXX11_clang_opencl_global_host = 1, |
| 7784 | C2x_clang_opencl_global_host = 2, |
| 7785 | SpellingNotCalculated = 15 |
| 7786 | |
| 7787 | }; |
| 7788 | |
| 7789 | // Factory methods |
| 7790 | static OpenCLGlobalHostAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7791 | static OpenCLGlobalHostAddressSpaceAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7792 | static OpenCLGlobalHostAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7793 | static OpenCLGlobalHostAddressSpaceAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7794 | |
| 7795 | // Constructors |
| 7796 | OpenCLGlobalHostAddressSpaceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7797 | ); |
| 7798 | |
| 7799 | OpenCLGlobalHostAddressSpaceAttr *clone(ASTContext &C) const; |
| 7800 | void printPretty(raw_ostream &OS, |
| 7801 | const PrintingPolicy &Policy) const; |
| 7802 | const char *getSpelling() const; |
| 7803 | |
| 7804 | |
| 7805 | static bool classof(const Attr *A) { return A->getKind() == attr::OpenCLGlobalHostAddressSpace; } |
| 7806 | }; |
| 7807 | |
| 7808 | class OpenCLIntelReqdSubGroupSizeAttr : public InheritableAttr { |
| 7809 | unsigned subGroupSize; |
| 7810 | |
| 7811 | public: |
| 7812 | // Factory methods |
| 7813 | static OpenCLIntelReqdSubGroupSizeAttr *CreateImplicit(ASTContext &Ctx, unsigned SubGroupSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7814 | static OpenCLIntelReqdSubGroupSizeAttr *Create(ASTContext &Ctx, unsigned SubGroupSize, const AttributeCommonInfo &CommonInfo); |
| 7815 | static OpenCLIntelReqdSubGroupSizeAttr *CreateImplicit(ASTContext &Ctx, unsigned SubGroupSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7816 | static OpenCLIntelReqdSubGroupSizeAttr *Create(ASTContext &Ctx, unsigned SubGroupSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7817 | |
| 7818 | // Constructors |
| 7819 | OpenCLIntelReqdSubGroupSizeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7820 | , unsigned SubGroupSize |
| 7821 | ); |
| 7822 | |
| 7823 | OpenCLIntelReqdSubGroupSizeAttr *clone(ASTContext &C) const; |
| 7824 | void printPretty(raw_ostream &OS, |
| 7825 | const PrintingPolicy &Policy) const; |
| 7826 | const char *getSpelling() const; |
| 7827 | unsigned getSubGroupSize() const { |
| 7828 | return subGroupSize; |
| 7829 | } |
| 7830 | |
| 7831 | |
| 7832 | |
| 7833 | static bool classof(const Attr *A) { return A->getKind() == attr::OpenCLIntelReqdSubGroupSize; } |
| 7834 | }; |
| 7835 | |
| 7836 | class OpenCLKernelAttr : public InheritableAttr { |
| 7837 | public: |
| 7838 | enum Spelling { |
| 7839 | Keyword_kernel = 0, |
| 7840 | SpellingNotCalculated = 15 |
| 7841 | |
| 7842 | }; |
| 7843 | |
| 7844 | // Factory methods |
| 7845 | static OpenCLKernelAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7846 | static OpenCLKernelAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7847 | static OpenCLKernelAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7848 | static OpenCLKernelAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7849 | |
| 7850 | // Constructors |
| 7851 | OpenCLKernelAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7852 | ); |
| 7853 | |
| 7854 | OpenCLKernelAttr *clone(ASTContext &C) const; |
| 7855 | void printPretty(raw_ostream &OS, |
| 7856 | const PrintingPolicy &Policy) const; |
| 7857 | const char *getSpelling() const; |
| 7858 | |
| 7859 | |
| 7860 | static bool classof(const Attr *A) { return A->getKind() == attr::OpenCLKernel; } |
| 7861 | }; |
| 7862 | |
| 7863 | class OpenCLLocalAddressSpaceAttr : public TypeAttr { |
| 7864 | public: |
| 7865 | enum Spelling { |
| 7866 | Keyword_local = 0, |
| 7867 | GNU_opencl_local = 2, |
| 7868 | CXX11_clang_opencl_local = 3, |
| 7869 | C2x_clang_opencl_local = 4, |
| 7870 | SpellingNotCalculated = 15 |
| 7871 | |
| 7872 | }; |
| 7873 | |
| 7874 | // Factory methods |
| 7875 | static OpenCLLocalAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7876 | static OpenCLLocalAddressSpaceAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7877 | static OpenCLLocalAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLLocalAddressSpaceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7878 | static OpenCLLocalAddressSpaceAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLLocalAddressSpaceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7879 | |
| 7880 | // Constructors |
| 7881 | OpenCLLocalAddressSpaceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7882 | ); |
| 7883 | |
| 7884 | OpenCLLocalAddressSpaceAttr *clone(ASTContext &C) const; |
| 7885 | void printPretty(raw_ostream &OS, |
| 7886 | const PrintingPolicy &Policy) const; |
| 7887 | const char *getSpelling() const; |
| 7888 | Spelling getSemanticSpelling() const; |
| 7889 | |
| 7890 | |
| 7891 | static bool classof(const Attr *A) { return A->getKind() == attr::OpenCLLocalAddressSpace; } |
| 7892 | }; |
| 7893 | |
| 7894 | class OpenCLPrivateAddressSpaceAttr : public TypeAttr { |
| 7895 | public: |
| 7896 | enum Spelling { |
| 7897 | Keyword_private = 0, |
| 7898 | GNU_opencl_private = 2, |
| 7899 | CXX11_clang_opencl_private = 3, |
| 7900 | C2x_clang_opencl_private = 4, |
| 7901 | SpellingNotCalculated = 15 |
| 7902 | |
| 7903 | }; |
| 7904 | |
| 7905 | // Factory methods |
| 7906 | static OpenCLPrivateAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7907 | static OpenCLPrivateAddressSpaceAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7908 | static OpenCLPrivateAddressSpaceAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLPrivateAddressSpaceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7909 | static OpenCLPrivateAddressSpaceAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OpenCLPrivateAddressSpaceAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 7910 | |
| 7911 | // Constructors |
| 7912 | OpenCLPrivateAddressSpaceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7913 | ); |
| 7914 | |
| 7915 | OpenCLPrivateAddressSpaceAttr *clone(ASTContext &C) const; |
| 7916 | void printPretty(raw_ostream &OS, |
| 7917 | const PrintingPolicy &Policy) const; |
| 7918 | const char *getSpelling() const; |
| 7919 | Spelling getSemanticSpelling() const; |
| 7920 | |
| 7921 | |
| 7922 | static bool classof(const Attr *A) { return A->getKind() == attr::OpenCLPrivateAddressSpace; } |
| 7923 | }; |
| 7924 | |
| 7925 | class OpenCLUnrollHintAttr : public InheritableAttr { |
| 7926 | unsigned unrollHint; |
| 7927 | |
| 7928 | public: |
| 7929 | // Factory methods |
| 7930 | static OpenCLUnrollHintAttr *CreateImplicit(ASTContext &Ctx, unsigned UnrollHint, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7931 | static OpenCLUnrollHintAttr *Create(ASTContext &Ctx, unsigned UnrollHint, const AttributeCommonInfo &CommonInfo); |
| 7932 | static OpenCLUnrollHintAttr *CreateImplicit(ASTContext &Ctx, unsigned UnrollHint, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7933 | static OpenCLUnrollHintAttr *Create(ASTContext &Ctx, unsigned UnrollHint, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7934 | |
| 7935 | // Constructors |
| 7936 | OpenCLUnrollHintAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7937 | , unsigned UnrollHint |
| 7938 | ); |
| 7939 | |
| 7940 | OpenCLUnrollHintAttr *clone(ASTContext &C) const; |
| 7941 | void printPretty(raw_ostream &OS, |
| 7942 | const PrintingPolicy &Policy) const; |
| 7943 | const char *getSpelling() const; |
| 7944 | unsigned getUnrollHint() const { |
| 7945 | return unrollHint; |
| 7946 | } |
| 7947 | |
| 7948 | |
| 7949 | |
| 7950 | static bool classof(const Attr *A) { return A->getKind() == attr::OpenCLUnrollHint; } |
| 7951 | }; |
| 7952 | |
| 7953 | class OptimizeNoneAttr : public InheritableAttr { |
| 7954 | public: |
| 7955 | enum Spelling { |
| 7956 | GNU_optnone = 0, |
| 7957 | CXX11_clang_optnone = 1, |
| 7958 | C2x_clang_optnone = 2, |
| 7959 | SpellingNotCalculated = 15 |
| 7960 | |
| 7961 | }; |
| 7962 | |
| 7963 | // Factory methods |
| 7964 | static OptimizeNoneAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7965 | static OptimizeNoneAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7966 | static OptimizeNoneAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7967 | static OptimizeNoneAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7968 | |
| 7969 | // Constructors |
| 7970 | OptimizeNoneAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 7971 | ); |
| 7972 | |
| 7973 | OptimizeNoneAttr *clone(ASTContext &C) const; |
| 7974 | void printPretty(raw_ostream &OS, |
| 7975 | const PrintingPolicy &Policy) const; |
| 7976 | const char *getSpelling() const; |
| 7977 | |
| 7978 | |
| 7979 | static bool classof(const Attr *A) { return A->getKind() == attr::OptimizeNone; } |
| 7980 | }; |
| 7981 | |
| 7982 | class OverloadableAttr : public Attr { |
| 7983 | public: |
| 7984 | enum Spelling { |
| 7985 | GNU_overloadable = 0, |
| 7986 | CXX11_clang_overloadable = 1, |
| 7987 | C2x_clang_overloadable = 2, |
| 7988 | SpellingNotCalculated = 15 |
| 7989 | |
| 7990 | }; |
| 7991 | |
| 7992 | // Factory methods |
| 7993 | static OverloadableAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 7994 | static OverloadableAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 7995 | static OverloadableAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7996 | static OverloadableAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 7997 | |
| 7998 | // Constructors |
| 7999 | OverloadableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8000 | ); |
| 8001 | |
| 8002 | OverloadableAttr *clone(ASTContext &C) const; |
| 8003 | void printPretty(raw_ostream &OS, |
| 8004 | const PrintingPolicy &Policy) const; |
| 8005 | const char *getSpelling() const; |
| 8006 | |
| 8007 | |
| 8008 | static bool classof(const Attr *A) { return A->getKind() == attr::Overloadable; } |
| 8009 | }; |
| 8010 | |
| 8011 | class OverrideAttr : public InheritableAttr { |
| 8012 | public: |
| 8013 | // Factory methods |
| 8014 | static OverrideAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8015 | static OverrideAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 8016 | static OverrideAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8017 | static OverrideAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8018 | |
| 8019 | // Constructors |
| 8020 | OverrideAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8021 | ); |
| 8022 | |
| 8023 | OverrideAttr *clone(ASTContext &C) const; |
| 8024 | void printPretty(raw_ostream &OS, |
| 8025 | const PrintingPolicy &Policy) const; |
| 8026 | const char *getSpelling() const; |
| 8027 | |
| 8028 | |
| 8029 | static bool classof(const Attr *A) { return A->getKind() == attr::Override; } |
| 8030 | }; |
| 8031 | |
| 8032 | class OwnerAttr : public InheritableAttr { |
| 8033 | TypeSourceInfo * derefType; |
| 8034 | |
| 8035 | public: |
| 8036 | // Factory methods |
| 8037 | static OwnerAttr *CreateImplicit(ASTContext &Ctx, TypeSourceInfo * DerefType, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8038 | static OwnerAttr *Create(ASTContext &Ctx, TypeSourceInfo * DerefType, const AttributeCommonInfo &CommonInfo); |
| 8039 | static OwnerAttr *CreateImplicit(ASTContext &Ctx, TypeSourceInfo * DerefType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8040 | static OwnerAttr *Create(ASTContext &Ctx, TypeSourceInfo * DerefType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8041 | |
| 8042 | // Constructors |
| 8043 | OwnerAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8044 | , TypeSourceInfo * DerefType |
| 8045 | ); |
| 8046 | OwnerAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8047 | ); |
| 8048 | |
| 8049 | OwnerAttr *clone(ASTContext &C) const; |
| 8050 | void printPretty(raw_ostream &OS, |
| 8051 | const PrintingPolicy &Policy) const; |
| 8052 | const char *getSpelling() const; |
| 8053 | QualType getDerefType() const { |
| 8054 | return derefType->getType(); |
| 8055 | } TypeSourceInfo * getDerefTypeLoc() const { |
| 8056 | return derefType; |
| 8057 | } |
| 8058 | |
| 8059 | |
| 8060 | |
| 8061 | static bool classof(const Attr *A) { return A->getKind() == attr::Owner; } |
| 8062 | }; |
| 8063 | |
| 8064 | class OwnershipAttr : public InheritableAttr { |
| 8065 | IdentifierInfo * module; |
| 8066 | |
| 8067 | unsigned args_Size; |
| 8068 | ParamIdx *args_; |
| 8069 | |
| 8070 | public: |
| 8071 | enum Spelling { |
| 8072 | GNU_ownership_holds = 0, |
| 8073 | CXX11_clang_ownership_holds = 1, |
| 8074 | C2x_clang_ownership_holds = 2, |
| 8075 | GNU_ownership_returns = 3, |
| 8076 | CXX11_clang_ownership_returns = 4, |
| 8077 | C2x_clang_ownership_returns = 5, |
| 8078 | GNU_ownership_takes = 6, |
| 8079 | CXX11_clang_ownership_takes = 7, |
| 8080 | C2x_clang_ownership_takes = 8, |
| 8081 | SpellingNotCalculated = 15 |
| 8082 | |
| 8083 | }; |
| 8084 | |
| 8085 | // Factory methods |
| 8086 | static OwnershipAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Module, ParamIdx *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8087 | static OwnershipAttr *Create(ASTContext &Ctx, IdentifierInfo * Module, ParamIdx *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 8088 | static OwnershipAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * Module, ParamIdx *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OwnershipAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 8089 | static OwnershipAttr *Create(ASTContext &Ctx, IdentifierInfo * Module, ParamIdx *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, OwnershipAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 8090 | |
| 8091 | // Constructors |
| 8092 | OwnershipAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8093 | , IdentifierInfo * Module |
| 8094 | , ParamIdx *Args, unsigned ArgsSize |
| 8095 | ); |
| 8096 | OwnershipAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8097 | , IdentifierInfo * Module |
| 8098 | ); |
| 8099 | |
| 8100 | OwnershipAttr *clone(ASTContext &C) const; |
| 8101 | void printPretty(raw_ostream &OS, |
| 8102 | const PrintingPolicy &Policy) const; |
| 8103 | const char *getSpelling() const; |
| 8104 | Spelling getSemanticSpelling() const; |
| 8105 | bool isHolds() const { return getAttributeSpellingListIndex() == 0 || |
| 8106 | getAttributeSpellingListIndex() == 1 || |
| 8107 | getAttributeSpellingListIndex() == 2; } |
| 8108 | bool isReturns() const { return getAttributeSpellingListIndex() == 3 || |
| 8109 | getAttributeSpellingListIndex() == 4 || |
| 8110 | getAttributeSpellingListIndex() == 5; } |
| 8111 | bool isTakes() const { return getAttributeSpellingListIndex() == 6 || |
| 8112 | getAttributeSpellingListIndex() == 7 || |
| 8113 | getAttributeSpellingListIndex() == 8; } |
| 8114 | IdentifierInfo * getModule() const { |
| 8115 | return module; |
| 8116 | } |
| 8117 | |
| 8118 | typedef ParamIdx* args_iterator; |
| 8119 | args_iterator args_begin() const { return args_; } |
| 8120 | args_iterator args_end() const { return args_ + args_Size; } |
| 8121 | unsigned args_size() const { return args_Size; } |
| 8122 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 8123 | |
| 8124 | |
| 8125 | |
| 8126 | enum OwnershipKind { Holds, Returns, Takes }; |
| 8127 | OwnershipKind getOwnKind() const { |
| 8128 | return isHolds() ? Holds : |
| 8129 | isTakes() ? Takes : |
| 8130 | Returns; |
| 8131 | } |
| 8132 | |
| 8133 | |
| 8134 | static bool classof(const Attr *A) { return A->getKind() == attr::Ownership; } |
| 8135 | }; |
| 8136 | |
| 8137 | class PackedAttr : public InheritableAttr { |
| 8138 | public: |
| 8139 | enum Spelling { |
| 8140 | GNU_packed = 0, |
| 8141 | CXX11_gnu_packed = 1, |
| 8142 | C2x_gnu_packed = 2, |
| 8143 | SpellingNotCalculated = 15 |
| 8144 | |
| 8145 | }; |
| 8146 | |
| 8147 | // Factory methods |
| 8148 | static PackedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8149 | static PackedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 8150 | static PackedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8151 | static PackedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8152 | |
| 8153 | // Constructors |
| 8154 | PackedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8155 | ); |
| 8156 | |
| 8157 | PackedAttr *clone(ASTContext &C) const; |
| 8158 | void printPretty(raw_ostream &OS, |
| 8159 | const PrintingPolicy &Policy) const; |
| 8160 | const char *getSpelling() const; |
| 8161 | |
| 8162 | |
| 8163 | static bool classof(const Attr *A) { return A->getKind() == attr::Packed; } |
| 8164 | }; |
| 8165 | |
| 8166 | class ParamTypestateAttr : public InheritableAttr { |
| 8167 | public: |
| 8168 | enum ConsumedState { |
| 8169 | Unknown, |
| 8170 | Consumed, |
| 8171 | Unconsumed |
| 8172 | }; |
| 8173 | private: |
| 8174 | ConsumedState paramState; |
| 8175 | |
| 8176 | public: |
| 8177 | enum Spelling { |
| 8178 | GNU_param_typestate = 0, |
| 8179 | CXX11_clang_param_typestate = 1, |
| 8180 | SpellingNotCalculated = 15 |
| 8181 | |
| 8182 | }; |
| 8183 | |
| 8184 | // Factory methods |
| 8185 | static ParamTypestateAttr *CreateImplicit(ASTContext &Ctx, ConsumedState ParamState, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8186 | static ParamTypestateAttr *Create(ASTContext &Ctx, ConsumedState ParamState, const AttributeCommonInfo &CommonInfo); |
| 8187 | static ParamTypestateAttr *CreateImplicit(ASTContext &Ctx, ConsumedState ParamState, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8188 | static ParamTypestateAttr *Create(ASTContext &Ctx, ConsumedState ParamState, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8189 | |
| 8190 | // Constructors |
| 8191 | ParamTypestateAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8192 | , ConsumedState ParamState |
| 8193 | ); |
| 8194 | |
| 8195 | ParamTypestateAttr *clone(ASTContext &C) const; |
| 8196 | void printPretty(raw_ostream &OS, |
| 8197 | const PrintingPolicy &Policy) const; |
| 8198 | const char *getSpelling() const; |
| 8199 | ConsumedState getParamState() const { |
| 8200 | return paramState; |
| 8201 | } |
| 8202 | |
| 8203 | static bool ConvertStrToConsumedState(StringRef Val, ConsumedState &Out); |
| 8204 | static const char *ConvertConsumedStateToStr(ConsumedState Val); |
| 8205 | |
| 8206 | |
| 8207 | static bool classof(const Attr *A) { return A->getKind() == attr::ParamTypestate; } |
| 8208 | }; |
| 8209 | |
| 8210 | class PascalAttr : public InheritableAttr { |
| 8211 | public: |
| 8212 | enum Spelling { |
| 8213 | GNU_pascal = 0, |
| 8214 | CXX11_clang_pascal = 1, |
| 8215 | C2x_clang_pascal = 2, |
| 8216 | Keyword_pascal = 3, |
| 8217 | SpellingNotCalculated = 15 |
| 8218 | |
| 8219 | }; |
| 8220 | |
| 8221 | // Factory methods |
| 8222 | static PascalAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8223 | static PascalAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 8224 | static PascalAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8225 | static PascalAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8226 | |
| 8227 | // Constructors |
| 8228 | PascalAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8229 | ); |
| 8230 | |
| 8231 | PascalAttr *clone(ASTContext &C) const; |
| 8232 | void printPretty(raw_ostream &OS, |
| 8233 | const PrintingPolicy &Policy) const; |
| 8234 | const char *getSpelling() const; |
| 8235 | |
| 8236 | |
| 8237 | static bool classof(const Attr *A) { return A->getKind() == attr::Pascal; } |
| 8238 | }; |
| 8239 | |
| 8240 | class PassObjectSizeAttr : public InheritableParamAttr { |
| 8241 | int type; |
| 8242 | |
| 8243 | public: |
| 8244 | enum Spelling { |
| 8245 | GNU_pass_object_size = 0, |
| 8246 | CXX11_clang_pass_object_size = 1, |
| 8247 | C2x_clang_pass_object_size = 2, |
| 8248 | GNU_pass_dynamic_object_size = 3, |
| 8249 | CXX11_clang_pass_dynamic_object_size = 4, |
| 8250 | C2x_clang_pass_dynamic_object_size = 5, |
| 8251 | SpellingNotCalculated = 15 |
| 8252 | |
| 8253 | }; |
| 8254 | |
| 8255 | // Factory methods |
| 8256 | static PassObjectSizeAttr *CreateImplicit(ASTContext &Ctx, int Type, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8257 | static PassObjectSizeAttr *Create(ASTContext &Ctx, int Type, const AttributeCommonInfo &CommonInfo); |
| 8258 | static PassObjectSizeAttr *CreateImplicit(ASTContext &Ctx, int Type, SourceRange Range, AttributeCommonInfo::Syntax Syntax, PassObjectSizeAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 8259 | static PassObjectSizeAttr *Create(ASTContext &Ctx, int Type, SourceRange Range, AttributeCommonInfo::Syntax Syntax, PassObjectSizeAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 8260 | |
| 8261 | // Constructors |
| 8262 | PassObjectSizeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8263 | , int Type |
| 8264 | ); |
| 8265 | |
| 8266 | PassObjectSizeAttr *clone(ASTContext &C) const; |
| 8267 | void printPretty(raw_ostream &OS, |
| 8268 | const PrintingPolicy &Policy) const; |
| 8269 | const char *getSpelling() const; |
| 8270 | Spelling getSemanticSpelling() const; |
| 8271 | bool isDynamic() const { return getAttributeSpellingListIndex() == 3 || |
| 8272 | getAttributeSpellingListIndex() == 4 || |
| 8273 | getAttributeSpellingListIndex() == 5; } |
| 8274 | int getType() const { |
| 8275 | return type; |
| 8276 | } |
| 8277 | |
| 8278 | |
| 8279 | |
| 8280 | static bool classof(const Attr *A) { return A->getKind() == attr::PassObjectSize; } |
| 8281 | }; |
| 8282 | |
| 8283 | class PatchableFunctionEntryAttr : public InheritableAttr { |
| 8284 | unsigned count; |
| 8285 | |
| 8286 | int offset; |
| 8287 | |
| 8288 | public: |
| 8289 | enum Spelling { |
| 8290 | GNU_patchable_function_entry = 0, |
| 8291 | CXX11_gnu_patchable_function_entry = 1, |
| 8292 | C2x_gnu_patchable_function_entry = 2, |
| 8293 | SpellingNotCalculated = 15 |
| 8294 | |
| 8295 | }; |
| 8296 | |
| 8297 | // Factory methods |
| 8298 | static PatchableFunctionEntryAttr *CreateImplicit(ASTContext &Ctx, unsigned Count, int Offset, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8299 | static PatchableFunctionEntryAttr *Create(ASTContext &Ctx, unsigned Count, int Offset, const AttributeCommonInfo &CommonInfo); |
| 8300 | static PatchableFunctionEntryAttr *CreateImplicit(ASTContext &Ctx, unsigned Count, int Offset, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8301 | static PatchableFunctionEntryAttr *Create(ASTContext &Ctx, unsigned Count, int Offset, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8302 | |
| 8303 | // Constructors |
| 8304 | PatchableFunctionEntryAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8305 | , unsigned Count |
| 8306 | , int Offset |
| 8307 | ); |
| 8308 | PatchableFunctionEntryAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8309 | , unsigned Count |
| 8310 | ); |
| 8311 | |
| 8312 | PatchableFunctionEntryAttr *clone(ASTContext &C) const; |
| 8313 | void printPretty(raw_ostream &OS, |
| 8314 | const PrintingPolicy &Policy) const; |
| 8315 | const char *getSpelling() const; |
| 8316 | unsigned getCount() const { |
| 8317 | return count; |
| 8318 | } |
| 8319 | |
| 8320 | int getOffset() const { |
| 8321 | return offset; |
| 8322 | } |
| 8323 | |
| 8324 | static const int DefaultOffset = 0; |
| 8325 | |
| 8326 | |
| 8327 | |
| 8328 | static bool classof(const Attr *A) { return A->getKind() == attr::PatchableFunctionEntry; } |
| 8329 | }; |
| 8330 | |
| 8331 | class PcsAttr : public InheritableAttr { |
| 8332 | public: |
| 8333 | enum PCSType { |
| 8334 | AAPCS, |
| 8335 | AAPCS_VFP |
| 8336 | }; |
| 8337 | private: |
| 8338 | PCSType pCS; |
| 8339 | |
| 8340 | public: |
| 8341 | enum Spelling { |
| 8342 | GNU_pcs = 0, |
| 8343 | CXX11_gnu_pcs = 1, |
| 8344 | C2x_gnu_pcs = 2, |
| 8345 | SpellingNotCalculated = 15 |
| 8346 | |
| 8347 | }; |
| 8348 | |
| 8349 | // Factory methods |
| 8350 | static PcsAttr *CreateImplicit(ASTContext &Ctx, PCSType PCS, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8351 | static PcsAttr *Create(ASTContext &Ctx, PCSType PCS, const AttributeCommonInfo &CommonInfo); |
| 8352 | static PcsAttr *CreateImplicit(ASTContext &Ctx, PCSType PCS, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8353 | static PcsAttr *Create(ASTContext &Ctx, PCSType PCS, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8354 | |
| 8355 | // Constructors |
| 8356 | PcsAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8357 | , PCSType PCS |
| 8358 | ); |
| 8359 | |
| 8360 | PcsAttr *clone(ASTContext &C) const; |
| 8361 | void printPretty(raw_ostream &OS, |
| 8362 | const PrintingPolicy &Policy) const; |
| 8363 | const char *getSpelling() const; |
| 8364 | PCSType getPCS() const { |
| 8365 | return pCS; |
| 8366 | } |
| 8367 | |
| 8368 | static bool ConvertStrToPCSType(StringRef Val, PCSType &Out); |
| 8369 | static const char *ConvertPCSTypeToStr(PCSType Val); |
| 8370 | |
| 8371 | |
| 8372 | static bool classof(const Attr *A) { return A->getKind() == attr::Pcs; } |
| 8373 | }; |
| 8374 | |
| 8375 | class PointerAttr : public InheritableAttr { |
| 8376 | TypeSourceInfo * derefType; |
| 8377 | |
| 8378 | public: |
| 8379 | // Factory methods |
| 8380 | static PointerAttr *CreateImplicit(ASTContext &Ctx, TypeSourceInfo * DerefType, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8381 | static PointerAttr *Create(ASTContext &Ctx, TypeSourceInfo * DerefType, const AttributeCommonInfo &CommonInfo); |
| 8382 | static PointerAttr *CreateImplicit(ASTContext &Ctx, TypeSourceInfo * DerefType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8383 | static PointerAttr *Create(ASTContext &Ctx, TypeSourceInfo * DerefType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8384 | |
| 8385 | // Constructors |
| 8386 | PointerAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8387 | , TypeSourceInfo * DerefType |
| 8388 | ); |
| 8389 | PointerAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8390 | ); |
| 8391 | |
| 8392 | PointerAttr *clone(ASTContext &C) const; |
| 8393 | void printPretty(raw_ostream &OS, |
| 8394 | const PrintingPolicy &Policy) const; |
| 8395 | const char *getSpelling() const; |
| 8396 | QualType getDerefType() const { |
| 8397 | return derefType->getType(); |
| 8398 | } TypeSourceInfo * getDerefTypeLoc() const { |
| 8399 | return derefType; |
| 8400 | } |
| 8401 | |
| 8402 | |
| 8403 | |
| 8404 | static bool classof(const Attr *A) { return A->getKind() == attr::Pointer; } |
| 8405 | }; |
| 8406 | |
| 8407 | class PragmaClangBSSSectionAttr : public InheritableAttr { |
| 8408 | unsigned nameLength; |
| 8409 | char *name; |
| 8410 | |
| 8411 | public: |
| 8412 | // Factory methods |
| 8413 | static PragmaClangBSSSectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8414 | static PragmaClangBSSSectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo); |
| 8415 | static PragmaClangBSSSectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8416 | static PragmaClangBSSSectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8417 | |
| 8418 | // Constructors |
| 8419 | PragmaClangBSSSectionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8420 | , llvm::StringRef Name |
| 8421 | ); |
| 8422 | |
| 8423 | PragmaClangBSSSectionAttr *clone(ASTContext &C) const; |
| 8424 | void printPretty(raw_ostream &OS, |
| 8425 | const PrintingPolicy &Policy) const; |
| 8426 | const char *getSpelling() const; |
| 8427 | llvm::StringRef getName() const { |
| 8428 | return llvm::StringRef(name, nameLength); |
| 8429 | } |
| 8430 | unsigned getNameLength() const { |
| 8431 | return nameLength; |
| 8432 | } |
| 8433 | void setName(ASTContext &C, llvm::StringRef S) { |
| 8434 | nameLength = S.size(); |
| 8435 | this->name = new (C, 1) char [nameLength]; |
| 8436 | if (!S.empty()) |
| 8437 | std::memcpy(this->name, S.data(), nameLength); |
| 8438 | } |
| 8439 | |
| 8440 | |
| 8441 | |
| 8442 | static bool classof(const Attr *A) { return A->getKind() == attr::PragmaClangBSSSection; } |
| 8443 | }; |
| 8444 | |
| 8445 | class PragmaClangDataSectionAttr : public InheritableAttr { |
| 8446 | unsigned nameLength; |
| 8447 | char *name; |
| 8448 | |
| 8449 | public: |
| 8450 | // Factory methods |
| 8451 | static PragmaClangDataSectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8452 | static PragmaClangDataSectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo); |
| 8453 | static PragmaClangDataSectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8454 | static PragmaClangDataSectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8455 | |
| 8456 | // Constructors |
| 8457 | PragmaClangDataSectionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8458 | , llvm::StringRef Name |
| 8459 | ); |
| 8460 | |
| 8461 | PragmaClangDataSectionAttr *clone(ASTContext &C) const; |
| 8462 | void printPretty(raw_ostream &OS, |
| 8463 | const PrintingPolicy &Policy) const; |
| 8464 | const char *getSpelling() const; |
| 8465 | llvm::StringRef getName() const { |
| 8466 | return llvm::StringRef(name, nameLength); |
| 8467 | } |
| 8468 | unsigned getNameLength() const { |
| 8469 | return nameLength; |
| 8470 | } |
| 8471 | void setName(ASTContext &C, llvm::StringRef S) { |
| 8472 | nameLength = S.size(); |
| 8473 | this->name = new (C, 1) char [nameLength]; |
| 8474 | if (!S.empty()) |
| 8475 | std::memcpy(this->name, S.data(), nameLength); |
| 8476 | } |
| 8477 | |
| 8478 | |
| 8479 | |
| 8480 | static bool classof(const Attr *A) { return A->getKind() == attr::PragmaClangDataSection; } |
| 8481 | }; |
| 8482 | |
| 8483 | class PragmaClangRelroSectionAttr : public InheritableAttr { |
| 8484 | unsigned nameLength; |
| 8485 | char *name; |
| 8486 | |
| 8487 | public: |
| 8488 | // Factory methods |
| 8489 | static PragmaClangRelroSectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8490 | static PragmaClangRelroSectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo); |
| 8491 | static PragmaClangRelroSectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8492 | static PragmaClangRelroSectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8493 | |
| 8494 | // Constructors |
| 8495 | PragmaClangRelroSectionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8496 | , llvm::StringRef Name |
| 8497 | ); |
| 8498 | |
| 8499 | PragmaClangRelroSectionAttr *clone(ASTContext &C) const; |
| 8500 | void printPretty(raw_ostream &OS, |
| 8501 | const PrintingPolicy &Policy) const; |
| 8502 | const char *getSpelling() const; |
| 8503 | llvm::StringRef getName() const { |
| 8504 | return llvm::StringRef(name, nameLength); |
| 8505 | } |
| 8506 | unsigned getNameLength() const { |
| 8507 | return nameLength; |
| 8508 | } |
| 8509 | void setName(ASTContext &C, llvm::StringRef S) { |
| 8510 | nameLength = S.size(); |
| 8511 | this->name = new (C, 1) char [nameLength]; |
| 8512 | if (!S.empty()) |
| 8513 | std::memcpy(this->name, S.data(), nameLength); |
| 8514 | } |
| 8515 | |
| 8516 | |
| 8517 | |
| 8518 | static bool classof(const Attr *A) { return A->getKind() == attr::PragmaClangRelroSection; } |
| 8519 | }; |
| 8520 | |
| 8521 | class PragmaClangRodataSectionAttr : public InheritableAttr { |
| 8522 | unsigned nameLength; |
| 8523 | char *name; |
| 8524 | |
| 8525 | public: |
| 8526 | // Factory methods |
| 8527 | static PragmaClangRodataSectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8528 | static PragmaClangRodataSectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo); |
| 8529 | static PragmaClangRodataSectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8530 | static PragmaClangRodataSectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8531 | |
| 8532 | // Constructors |
| 8533 | PragmaClangRodataSectionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8534 | , llvm::StringRef Name |
| 8535 | ); |
| 8536 | |
| 8537 | PragmaClangRodataSectionAttr *clone(ASTContext &C) const; |
| 8538 | void printPretty(raw_ostream &OS, |
| 8539 | const PrintingPolicy &Policy) const; |
| 8540 | const char *getSpelling() const; |
| 8541 | llvm::StringRef getName() const { |
| 8542 | return llvm::StringRef(name, nameLength); |
| 8543 | } |
| 8544 | unsigned getNameLength() const { |
| 8545 | return nameLength; |
| 8546 | } |
| 8547 | void setName(ASTContext &C, llvm::StringRef S) { |
| 8548 | nameLength = S.size(); |
| 8549 | this->name = new (C, 1) char [nameLength]; |
| 8550 | if (!S.empty()) |
| 8551 | std::memcpy(this->name, S.data(), nameLength); |
| 8552 | } |
| 8553 | |
| 8554 | |
| 8555 | |
| 8556 | static bool classof(const Attr *A) { return A->getKind() == attr::PragmaClangRodataSection; } |
| 8557 | }; |
| 8558 | |
| 8559 | class PragmaClangTextSectionAttr : public InheritableAttr { |
| 8560 | unsigned nameLength; |
| 8561 | char *name; |
| 8562 | |
| 8563 | public: |
| 8564 | // Factory methods |
| 8565 | static PragmaClangTextSectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8566 | static PragmaClangTextSectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo); |
| 8567 | static PragmaClangTextSectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8568 | static PragmaClangTextSectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8569 | |
| 8570 | // Constructors |
| 8571 | PragmaClangTextSectionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8572 | , llvm::StringRef Name |
| 8573 | ); |
| 8574 | |
| 8575 | PragmaClangTextSectionAttr *clone(ASTContext &C) const; |
| 8576 | void printPretty(raw_ostream &OS, |
| 8577 | const PrintingPolicy &Policy) const; |
| 8578 | const char *getSpelling() const; |
| 8579 | llvm::StringRef getName() const { |
| 8580 | return llvm::StringRef(name, nameLength); |
| 8581 | } |
| 8582 | unsigned getNameLength() const { |
| 8583 | return nameLength; |
| 8584 | } |
| 8585 | void setName(ASTContext &C, llvm::StringRef S) { |
| 8586 | nameLength = S.size(); |
| 8587 | this->name = new (C, 1) char [nameLength]; |
| 8588 | if (!S.empty()) |
| 8589 | std::memcpy(this->name, S.data(), nameLength); |
| 8590 | } |
| 8591 | |
| 8592 | |
| 8593 | |
| 8594 | static bool classof(const Attr *A) { return A->getKind() == attr::PragmaClangTextSection; } |
| 8595 | }; |
| 8596 | |
| 8597 | class PreferredNameAttr : public InheritableAttr { |
| 8598 | TypeSourceInfo * typedefType; |
| 8599 | |
| 8600 | public: |
| 8601 | enum Spelling { |
| 8602 | GNU_preferred_name = 0, |
| 8603 | CXX11_clang_preferred_name = 1, |
| 8604 | SpellingNotCalculated = 15 |
| 8605 | |
| 8606 | }; |
| 8607 | |
| 8608 | // Factory methods |
| 8609 | static PreferredNameAttr *CreateImplicit(ASTContext &Ctx, TypeSourceInfo * TypedefType, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8610 | static PreferredNameAttr *Create(ASTContext &Ctx, TypeSourceInfo * TypedefType, const AttributeCommonInfo &CommonInfo); |
| 8611 | static PreferredNameAttr *CreateImplicit(ASTContext &Ctx, TypeSourceInfo * TypedefType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8612 | static PreferredNameAttr *Create(ASTContext &Ctx, TypeSourceInfo * TypedefType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8613 | |
| 8614 | // Constructors |
| 8615 | PreferredNameAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8616 | , TypeSourceInfo * TypedefType |
| 8617 | ); |
| 8618 | |
| 8619 | PreferredNameAttr *clone(ASTContext &C) const; |
| 8620 | void printPretty(raw_ostream &OS, |
| 8621 | const PrintingPolicy &Policy) const; |
| 8622 | const char *getSpelling() const; |
| 8623 | QualType getTypedefType() const { |
| 8624 | return typedefType->getType(); |
| 8625 | } TypeSourceInfo * getTypedefTypeLoc() const { |
| 8626 | return typedefType; |
| 8627 | } |
| 8628 | |
| 8629 | |
| 8630 | |
| 8631 | static bool classof(const Attr *A) { return A->getKind() == attr::PreferredName; } |
| 8632 | }; |
| 8633 | |
| 8634 | class PreserveAllAttr : public InheritableAttr { |
| 8635 | public: |
| 8636 | enum Spelling { |
| 8637 | GNU_preserve_all = 0, |
| 8638 | CXX11_clang_preserve_all = 1, |
| 8639 | C2x_clang_preserve_all = 2, |
| 8640 | SpellingNotCalculated = 15 |
| 8641 | |
| 8642 | }; |
| 8643 | |
| 8644 | // Factory methods |
| 8645 | static PreserveAllAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8646 | static PreserveAllAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 8647 | static PreserveAllAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8648 | static PreserveAllAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8649 | |
| 8650 | // Constructors |
| 8651 | PreserveAllAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8652 | ); |
| 8653 | |
| 8654 | PreserveAllAttr *clone(ASTContext &C) const; |
| 8655 | void printPretty(raw_ostream &OS, |
| 8656 | const PrintingPolicy &Policy) const; |
| 8657 | const char *getSpelling() const; |
| 8658 | |
| 8659 | |
| 8660 | static bool classof(const Attr *A) { return A->getKind() == attr::PreserveAll; } |
| 8661 | }; |
| 8662 | |
| 8663 | class PreserveMostAttr : public InheritableAttr { |
| 8664 | public: |
| 8665 | enum Spelling { |
| 8666 | GNU_preserve_most = 0, |
| 8667 | CXX11_clang_preserve_most = 1, |
| 8668 | C2x_clang_preserve_most = 2, |
| 8669 | SpellingNotCalculated = 15 |
| 8670 | |
| 8671 | }; |
| 8672 | |
| 8673 | // Factory methods |
| 8674 | static PreserveMostAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8675 | static PreserveMostAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 8676 | static PreserveMostAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8677 | static PreserveMostAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8678 | |
| 8679 | // Constructors |
| 8680 | PreserveMostAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8681 | ); |
| 8682 | |
| 8683 | PreserveMostAttr *clone(ASTContext &C) const; |
| 8684 | void printPretty(raw_ostream &OS, |
| 8685 | const PrintingPolicy &Policy) const; |
| 8686 | const char *getSpelling() const; |
| 8687 | |
| 8688 | |
| 8689 | static bool classof(const Attr *A) { return A->getKind() == attr::PreserveMost; } |
| 8690 | }; |
| 8691 | |
| 8692 | class PtGuardedByAttr : public InheritableAttr { |
| 8693 | Expr * arg; |
| 8694 | |
| 8695 | public: |
| 8696 | // Factory methods |
| 8697 | static PtGuardedByAttr *CreateImplicit(ASTContext &Ctx, Expr * Arg, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8698 | static PtGuardedByAttr *Create(ASTContext &Ctx, Expr * Arg, const AttributeCommonInfo &CommonInfo); |
| 8699 | static PtGuardedByAttr *CreateImplicit(ASTContext &Ctx, Expr * Arg, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8700 | static PtGuardedByAttr *Create(ASTContext &Ctx, Expr * Arg, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8701 | |
| 8702 | // Constructors |
| 8703 | PtGuardedByAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8704 | , Expr * Arg |
| 8705 | ); |
| 8706 | |
| 8707 | PtGuardedByAttr *clone(ASTContext &C) const; |
| 8708 | void printPretty(raw_ostream &OS, |
| 8709 | const PrintingPolicy &Policy) const; |
| 8710 | const char *getSpelling() const; |
| 8711 | Expr * getArg() const { |
| 8712 | return arg; |
| 8713 | } |
| 8714 | |
| 8715 | |
| 8716 | |
| 8717 | static bool classof(const Attr *A) { return A->getKind() == attr::PtGuardedBy; } |
| 8718 | }; |
| 8719 | |
| 8720 | class PtGuardedVarAttr : public InheritableAttr { |
| 8721 | public: |
| 8722 | enum Spelling { |
| 8723 | GNU_pt_guarded_var = 0, |
| 8724 | CXX11_clang_pt_guarded_var = 1, |
| 8725 | SpellingNotCalculated = 15 |
| 8726 | |
| 8727 | }; |
| 8728 | |
| 8729 | // Factory methods |
| 8730 | static PtGuardedVarAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8731 | static PtGuardedVarAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 8732 | static PtGuardedVarAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8733 | static PtGuardedVarAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8734 | |
| 8735 | // Constructors |
| 8736 | PtGuardedVarAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8737 | ); |
| 8738 | |
| 8739 | PtGuardedVarAttr *clone(ASTContext &C) const; |
| 8740 | void printPretty(raw_ostream &OS, |
| 8741 | const PrintingPolicy &Policy) const; |
| 8742 | const char *getSpelling() const; |
| 8743 | |
| 8744 | |
| 8745 | static bool classof(const Attr *A) { return A->getKind() == attr::PtGuardedVar; } |
| 8746 | }; |
| 8747 | |
| 8748 | class Ptr32Attr : public TypeAttr { |
| 8749 | public: |
| 8750 | // Factory methods |
| 8751 | static Ptr32Attr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8752 | static Ptr32Attr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 8753 | static Ptr32Attr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8754 | static Ptr32Attr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8755 | |
| 8756 | // Constructors |
| 8757 | Ptr32Attr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8758 | ); |
| 8759 | |
| 8760 | Ptr32Attr *clone(ASTContext &C) const; |
| 8761 | void printPretty(raw_ostream &OS, |
| 8762 | const PrintingPolicy &Policy) const; |
| 8763 | const char *getSpelling() const; |
| 8764 | |
| 8765 | |
| 8766 | static bool classof(const Attr *A) { return A->getKind() == attr::Ptr32; } |
| 8767 | }; |
| 8768 | |
| 8769 | class Ptr64Attr : public TypeAttr { |
| 8770 | public: |
| 8771 | // Factory methods |
| 8772 | static Ptr64Attr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8773 | static Ptr64Attr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 8774 | static Ptr64Attr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8775 | static Ptr64Attr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8776 | |
| 8777 | // Constructors |
| 8778 | Ptr64Attr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8779 | ); |
| 8780 | |
| 8781 | Ptr64Attr *clone(ASTContext &C) const; |
| 8782 | void printPretty(raw_ostream &OS, |
| 8783 | const PrintingPolicy &Policy) const; |
| 8784 | const char *getSpelling() const; |
| 8785 | |
| 8786 | |
| 8787 | static bool classof(const Attr *A) { return A->getKind() == attr::Ptr64; } |
| 8788 | }; |
| 8789 | |
| 8790 | class PureAttr : public InheritableAttr { |
| 8791 | public: |
| 8792 | enum Spelling { |
| 8793 | GNU_pure = 0, |
| 8794 | CXX11_gnu_pure = 1, |
| 8795 | C2x_gnu_pure = 2, |
| 8796 | SpellingNotCalculated = 15 |
| 8797 | |
| 8798 | }; |
| 8799 | |
| 8800 | // Factory methods |
| 8801 | static PureAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8802 | static PureAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 8803 | static PureAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8804 | static PureAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8805 | |
| 8806 | // Constructors |
| 8807 | PureAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8808 | ); |
| 8809 | |
| 8810 | PureAttr *clone(ASTContext &C) const; |
| 8811 | void printPretty(raw_ostream &OS, |
| 8812 | const PrintingPolicy &Policy) const; |
| 8813 | const char *getSpelling() const; |
| 8814 | |
| 8815 | |
| 8816 | static bool classof(const Attr *A) { return A->getKind() == attr::Pure; } |
| 8817 | }; |
| 8818 | |
| 8819 | class RISCVInterruptAttr : public InheritableAttr { |
| 8820 | public: |
| 8821 | enum InterruptType { |
| 8822 | user, |
| 8823 | supervisor, |
| 8824 | machine |
| 8825 | }; |
| 8826 | private: |
| 8827 | InterruptType interrupt; |
| 8828 | |
| 8829 | public: |
| 8830 | enum Spelling { |
| 8831 | GNU_interrupt = 0, |
| 8832 | CXX11_gnu_interrupt = 1, |
| 8833 | C2x_gnu_interrupt = 2, |
| 8834 | SpellingNotCalculated = 15 |
| 8835 | |
| 8836 | }; |
| 8837 | |
| 8838 | // Factory methods |
| 8839 | static RISCVInterruptAttr *CreateImplicit(ASTContext &Ctx, InterruptType Interrupt, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8840 | static RISCVInterruptAttr *Create(ASTContext &Ctx, InterruptType Interrupt, const AttributeCommonInfo &CommonInfo); |
| 8841 | static RISCVInterruptAttr *CreateImplicit(ASTContext &Ctx, InterruptType Interrupt, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8842 | static RISCVInterruptAttr *Create(ASTContext &Ctx, InterruptType Interrupt, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8843 | |
| 8844 | // Constructors |
| 8845 | RISCVInterruptAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8846 | , InterruptType Interrupt |
| 8847 | ); |
| 8848 | RISCVInterruptAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8849 | ); |
| 8850 | |
| 8851 | RISCVInterruptAttr *clone(ASTContext &C) const; |
| 8852 | void printPretty(raw_ostream &OS, |
| 8853 | const PrintingPolicy &Policy) const; |
| 8854 | const char *getSpelling() const; |
| 8855 | InterruptType getInterrupt() const { |
| 8856 | return interrupt; |
| 8857 | } |
| 8858 | |
| 8859 | static bool ConvertStrToInterruptType(StringRef Val, InterruptType &Out); |
| 8860 | static const char *ConvertInterruptTypeToStr(InterruptType Val); |
| 8861 | |
| 8862 | |
| 8863 | static bool classof(const Attr *A) { return A->getKind() == attr::RISCVInterrupt; } |
| 8864 | }; |
| 8865 | |
| 8866 | class RegCallAttr : public InheritableAttr { |
| 8867 | public: |
| 8868 | enum Spelling { |
| 8869 | GNU_regcall = 0, |
| 8870 | CXX11_gnu_regcall = 1, |
| 8871 | C2x_gnu_regcall = 2, |
| 8872 | Keyword_regcall = 3, |
| 8873 | SpellingNotCalculated = 15 |
| 8874 | |
| 8875 | }; |
| 8876 | |
| 8877 | // Factory methods |
| 8878 | static RegCallAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8879 | static RegCallAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 8880 | static RegCallAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8881 | static RegCallAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8882 | |
| 8883 | // Constructors |
| 8884 | RegCallAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8885 | ); |
| 8886 | |
| 8887 | RegCallAttr *clone(ASTContext &C) const; |
| 8888 | void printPretty(raw_ostream &OS, |
| 8889 | const PrintingPolicy &Policy) const; |
| 8890 | const char *getSpelling() const; |
| 8891 | |
| 8892 | |
| 8893 | static bool classof(const Attr *A) { return A->getKind() == attr::RegCall; } |
| 8894 | }; |
| 8895 | |
| 8896 | class ReinitializesAttr : public InheritableAttr { |
| 8897 | public: |
| 8898 | enum Spelling { |
| 8899 | GNU_reinitializes = 0, |
| 8900 | CXX11_clang_reinitializes = 1, |
| 8901 | SpellingNotCalculated = 15 |
| 8902 | |
| 8903 | }; |
| 8904 | |
| 8905 | // Factory methods |
| 8906 | static ReinitializesAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8907 | static ReinitializesAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 8908 | static ReinitializesAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8909 | static ReinitializesAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8910 | |
| 8911 | // Constructors |
| 8912 | ReinitializesAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8913 | ); |
| 8914 | |
| 8915 | ReinitializesAttr *clone(ASTContext &C) const; |
| 8916 | void printPretty(raw_ostream &OS, |
| 8917 | const PrintingPolicy &Policy) const; |
| 8918 | const char *getSpelling() const; |
| 8919 | |
| 8920 | |
| 8921 | static bool classof(const Attr *A) { return A->getKind() == attr::Reinitializes; } |
| 8922 | }; |
| 8923 | |
| 8924 | class ReleaseCapabilityAttr : public InheritableAttr { |
| 8925 | unsigned args_Size; |
| 8926 | Expr * *args_; |
| 8927 | |
| 8928 | public: |
| 8929 | enum Spelling { |
| 8930 | GNU_release_capability = 0, |
| 8931 | CXX11_clang_release_capability = 1, |
| 8932 | GNU_release_shared_capability = 2, |
| 8933 | CXX11_clang_release_shared_capability = 3, |
| 8934 | GNU_release_generic_capability = 4, |
| 8935 | CXX11_clang_release_generic_capability = 5, |
| 8936 | GNU_unlock_function = 6, |
| 8937 | CXX11_clang_unlock_function = 7, |
| 8938 | SpellingNotCalculated = 15 |
| 8939 | |
| 8940 | }; |
| 8941 | |
| 8942 | // Factory methods |
| 8943 | static ReleaseCapabilityAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8944 | static ReleaseCapabilityAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 8945 | static ReleaseCapabilityAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, ReleaseCapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 8946 | static ReleaseCapabilityAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, ReleaseCapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 8947 | |
| 8948 | // Constructors |
| 8949 | ReleaseCapabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8950 | , Expr * *Args, unsigned ArgsSize |
| 8951 | ); |
| 8952 | ReleaseCapabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8953 | ); |
| 8954 | |
| 8955 | ReleaseCapabilityAttr *clone(ASTContext &C) const; |
| 8956 | void printPretty(raw_ostream &OS, |
| 8957 | const PrintingPolicy &Policy) const; |
| 8958 | const char *getSpelling() const; |
| 8959 | Spelling getSemanticSpelling() const; |
| 8960 | bool isShared() const { return getAttributeSpellingListIndex() == 2 || |
| 8961 | getAttributeSpellingListIndex() == 3; } |
| 8962 | bool isGeneric() const { return getAttributeSpellingListIndex() == 4 || |
| 8963 | getAttributeSpellingListIndex() == 5 || |
| 8964 | getAttributeSpellingListIndex() == 6 || |
| 8965 | getAttributeSpellingListIndex() == 7; } |
| 8966 | typedef Expr ** args_iterator; |
| 8967 | args_iterator args_begin() const { return args_; } |
| 8968 | args_iterator args_end() const { return args_ + args_Size; } |
| 8969 | unsigned args_size() const { return args_Size; } |
| 8970 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 8971 | |
| 8972 | |
| 8973 | |
| 8974 | |
| 8975 | static bool classof(const Attr *A) { return A->getKind() == attr::ReleaseCapability; } |
| 8976 | }; |
| 8977 | |
| 8978 | class ReleaseHandleAttr : public InheritableParamAttr { |
| 8979 | unsigned handleTypeLength; |
| 8980 | char *handleType; |
| 8981 | |
| 8982 | public: |
| 8983 | enum Spelling { |
| 8984 | GNU_release_handle = 0, |
| 8985 | CXX11_clang_release_handle = 1, |
| 8986 | C2x_clang_release_handle = 2, |
| 8987 | SpellingNotCalculated = 15 |
| 8988 | |
| 8989 | }; |
| 8990 | |
| 8991 | // Factory methods |
| 8992 | static ReleaseHandleAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef HandleType, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 8993 | static ReleaseHandleAttr *Create(ASTContext &Ctx, llvm::StringRef HandleType, const AttributeCommonInfo &CommonInfo); |
| 8994 | static ReleaseHandleAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef HandleType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8995 | static ReleaseHandleAttr *Create(ASTContext &Ctx, llvm::StringRef HandleType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 8996 | |
| 8997 | // Constructors |
| 8998 | ReleaseHandleAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 8999 | , llvm::StringRef HandleType |
| 9000 | ); |
| 9001 | |
| 9002 | ReleaseHandleAttr *clone(ASTContext &C) const; |
| 9003 | void printPretty(raw_ostream &OS, |
| 9004 | const PrintingPolicy &Policy) const; |
| 9005 | const char *getSpelling() const; |
| 9006 | llvm::StringRef getHandleType() const { |
| 9007 | return llvm::StringRef(handleType, handleTypeLength); |
| 9008 | } |
| 9009 | unsigned getHandleTypeLength() const { |
| 9010 | return handleTypeLength; |
| 9011 | } |
| 9012 | void setHandleType(ASTContext &C, llvm::StringRef S) { |
| 9013 | handleTypeLength = S.size(); |
| 9014 | this->handleType = new (C, 1) char [handleTypeLength]; |
| 9015 | if (!S.empty()) |
| 9016 | std::memcpy(this->handleType, S.data(), handleTypeLength); |
| 9017 | } |
| 9018 | |
| 9019 | |
| 9020 | |
| 9021 | static bool classof(const Attr *A) { return A->getKind() == attr::ReleaseHandle; } |
| 9022 | }; |
| 9023 | |
| 9024 | class RenderScriptKernelAttr : public Attr { |
| 9025 | public: |
| 9026 | // Factory methods |
| 9027 | static RenderScriptKernelAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9028 | static RenderScriptKernelAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9029 | static RenderScriptKernelAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9030 | static RenderScriptKernelAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9031 | |
| 9032 | // Constructors |
| 9033 | RenderScriptKernelAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9034 | ); |
| 9035 | |
| 9036 | RenderScriptKernelAttr *clone(ASTContext &C) const; |
| 9037 | void printPretty(raw_ostream &OS, |
| 9038 | const PrintingPolicy &Policy) const; |
| 9039 | const char *getSpelling() const; |
| 9040 | |
| 9041 | |
| 9042 | static bool classof(const Attr *A) { return A->getKind() == attr::RenderScriptKernel; } |
| 9043 | }; |
| 9044 | |
| 9045 | class ReqdWorkGroupSizeAttr : public InheritableAttr { |
| 9046 | unsigned xDim; |
| 9047 | |
| 9048 | unsigned yDim; |
| 9049 | |
| 9050 | unsigned zDim; |
| 9051 | |
| 9052 | public: |
| 9053 | // Factory methods |
| 9054 | static ReqdWorkGroupSizeAttr *CreateImplicit(ASTContext &Ctx, unsigned XDim, unsigned YDim, unsigned ZDim, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9055 | static ReqdWorkGroupSizeAttr *Create(ASTContext &Ctx, unsigned XDim, unsigned YDim, unsigned ZDim, const AttributeCommonInfo &CommonInfo); |
| 9056 | static ReqdWorkGroupSizeAttr *CreateImplicit(ASTContext &Ctx, unsigned XDim, unsigned YDim, unsigned ZDim, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9057 | static ReqdWorkGroupSizeAttr *Create(ASTContext &Ctx, unsigned XDim, unsigned YDim, unsigned ZDim, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9058 | |
| 9059 | // Constructors |
| 9060 | ReqdWorkGroupSizeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9061 | , unsigned XDim |
| 9062 | , unsigned YDim |
| 9063 | , unsigned ZDim |
| 9064 | ); |
| 9065 | |
| 9066 | ReqdWorkGroupSizeAttr *clone(ASTContext &C) const; |
| 9067 | void printPretty(raw_ostream &OS, |
| 9068 | const PrintingPolicy &Policy) const; |
| 9069 | const char *getSpelling() const; |
| 9070 | unsigned getXDim() const { |
| 9071 | return xDim; |
| 9072 | } |
| 9073 | |
| 9074 | unsigned getYDim() const { |
| 9075 | return yDim; |
| 9076 | } |
| 9077 | |
| 9078 | unsigned getZDim() const { |
| 9079 | return zDim; |
| 9080 | } |
| 9081 | |
| 9082 | |
| 9083 | |
| 9084 | static bool classof(const Attr *A) { return A->getKind() == attr::ReqdWorkGroupSize; } |
| 9085 | }; |
| 9086 | |
| 9087 | class RequiresCapabilityAttr : public InheritableAttr { |
| 9088 | unsigned args_Size; |
| 9089 | Expr * *args_; |
| 9090 | |
| 9091 | public: |
| 9092 | enum Spelling { |
| 9093 | GNU_requires_capability = 0, |
| 9094 | CXX11_clang_requires_capability = 1, |
| 9095 | GNU_exclusive_locks_required = 2, |
| 9096 | CXX11_clang_exclusive_locks_required = 3, |
| 9097 | GNU_requires_shared_capability = 4, |
| 9098 | CXX11_clang_requires_shared_capability = 5, |
| 9099 | GNU_shared_locks_required = 6, |
| 9100 | CXX11_clang_shared_locks_required = 7, |
| 9101 | SpellingNotCalculated = 15 |
| 9102 | |
| 9103 | }; |
| 9104 | |
| 9105 | // Factory methods |
| 9106 | static RequiresCapabilityAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9107 | static RequiresCapabilityAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 9108 | static RequiresCapabilityAttr *CreateImplicit(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, RequiresCapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 9109 | static RequiresCapabilityAttr *Create(ASTContext &Ctx, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, RequiresCapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 9110 | |
| 9111 | // Constructors |
| 9112 | RequiresCapabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9113 | , Expr * *Args, unsigned ArgsSize |
| 9114 | ); |
| 9115 | RequiresCapabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9116 | ); |
| 9117 | |
| 9118 | RequiresCapabilityAttr *clone(ASTContext &C) const; |
| 9119 | void printPretty(raw_ostream &OS, |
| 9120 | const PrintingPolicy &Policy) const; |
| 9121 | const char *getSpelling() const; |
| 9122 | Spelling getSemanticSpelling() const; |
| 9123 | bool isShared() const { return getAttributeSpellingListIndex() == 4 || |
| 9124 | getAttributeSpellingListIndex() == 5 || |
| 9125 | getAttributeSpellingListIndex() == 6 || |
| 9126 | getAttributeSpellingListIndex() == 7; } |
| 9127 | typedef Expr ** args_iterator; |
| 9128 | args_iterator args_begin() const { return args_; } |
| 9129 | args_iterator args_end() const { return args_ + args_Size; } |
| 9130 | unsigned args_size() const { return args_Size; } |
| 9131 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 9132 | |
| 9133 | |
| 9134 | |
| 9135 | |
| 9136 | static bool classof(const Attr *A) { return A->getKind() == attr::RequiresCapability; } |
| 9137 | }; |
| 9138 | |
| 9139 | class RestrictAttr : public InheritableAttr { |
| 9140 | public: |
| 9141 | enum Spelling { |
| 9142 | Declspec_restrict = 0, |
| 9143 | GNU_malloc = 1, |
| 9144 | CXX11_gnu_malloc = 2, |
| 9145 | C2x_gnu_malloc = 3, |
| 9146 | SpellingNotCalculated = 15 |
| 9147 | |
| 9148 | }; |
| 9149 | |
| 9150 | // Factory methods |
| 9151 | static RestrictAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9152 | static RestrictAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9153 | static RestrictAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, RestrictAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 9154 | static RestrictAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, RestrictAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 9155 | |
| 9156 | // Constructors |
| 9157 | RestrictAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9158 | ); |
| 9159 | |
| 9160 | RestrictAttr *clone(ASTContext &C) const; |
| 9161 | void printPretty(raw_ostream &OS, |
| 9162 | const PrintingPolicy &Policy) const; |
| 9163 | const char *getSpelling() const; |
| 9164 | Spelling getSemanticSpelling() const; |
| 9165 | |
| 9166 | |
| 9167 | static bool classof(const Attr *A) { return A->getKind() == attr::Restrict; } |
| 9168 | }; |
| 9169 | |
| 9170 | class ReturnTypestateAttr : public InheritableAttr { |
| 9171 | public: |
| 9172 | enum ConsumedState { |
| 9173 | Unknown, |
| 9174 | Consumed, |
| 9175 | Unconsumed |
| 9176 | }; |
| 9177 | private: |
| 9178 | ConsumedState state; |
| 9179 | |
| 9180 | public: |
| 9181 | enum Spelling { |
| 9182 | GNU_return_typestate = 0, |
| 9183 | CXX11_clang_return_typestate = 1, |
| 9184 | SpellingNotCalculated = 15 |
| 9185 | |
| 9186 | }; |
| 9187 | |
| 9188 | // Factory methods |
| 9189 | static ReturnTypestateAttr *CreateImplicit(ASTContext &Ctx, ConsumedState State, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9190 | static ReturnTypestateAttr *Create(ASTContext &Ctx, ConsumedState State, const AttributeCommonInfo &CommonInfo); |
| 9191 | static ReturnTypestateAttr *CreateImplicit(ASTContext &Ctx, ConsumedState State, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9192 | static ReturnTypestateAttr *Create(ASTContext &Ctx, ConsumedState State, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9193 | |
| 9194 | // Constructors |
| 9195 | ReturnTypestateAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9196 | , ConsumedState State |
| 9197 | ); |
| 9198 | |
| 9199 | ReturnTypestateAttr *clone(ASTContext &C) const; |
| 9200 | void printPretty(raw_ostream &OS, |
| 9201 | const PrintingPolicy &Policy) const; |
| 9202 | const char *getSpelling() const; |
| 9203 | ConsumedState getState() const { |
| 9204 | return state; |
| 9205 | } |
| 9206 | |
| 9207 | static bool ConvertStrToConsumedState(StringRef Val, ConsumedState &Out); |
| 9208 | static const char *ConvertConsumedStateToStr(ConsumedState Val); |
| 9209 | |
| 9210 | |
| 9211 | static bool classof(const Attr *A) { return A->getKind() == attr::ReturnTypestate; } |
| 9212 | }; |
| 9213 | |
| 9214 | class ReturnsNonNullAttr : public InheritableAttr { |
| 9215 | public: |
| 9216 | enum Spelling { |
| 9217 | GNU_returns_nonnull = 0, |
| 9218 | CXX11_gnu_returns_nonnull = 1, |
| 9219 | C2x_gnu_returns_nonnull = 2, |
| 9220 | SpellingNotCalculated = 15 |
| 9221 | |
| 9222 | }; |
| 9223 | |
| 9224 | // Factory methods |
| 9225 | static ReturnsNonNullAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9226 | static ReturnsNonNullAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9227 | static ReturnsNonNullAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9228 | static ReturnsNonNullAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9229 | |
| 9230 | // Constructors |
| 9231 | ReturnsNonNullAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9232 | ); |
| 9233 | |
| 9234 | ReturnsNonNullAttr *clone(ASTContext &C) const; |
| 9235 | void printPretty(raw_ostream &OS, |
| 9236 | const PrintingPolicy &Policy) const; |
| 9237 | const char *getSpelling() const; |
| 9238 | |
| 9239 | |
| 9240 | static bool classof(const Attr *A) { return A->getKind() == attr::ReturnsNonNull; } |
| 9241 | }; |
| 9242 | |
| 9243 | class ReturnsTwiceAttr : public InheritableAttr { |
| 9244 | public: |
| 9245 | enum Spelling { |
| 9246 | GNU_returns_twice = 0, |
| 9247 | CXX11_gnu_returns_twice = 1, |
| 9248 | C2x_gnu_returns_twice = 2, |
| 9249 | SpellingNotCalculated = 15 |
| 9250 | |
| 9251 | }; |
| 9252 | |
| 9253 | // Factory methods |
| 9254 | static ReturnsTwiceAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9255 | static ReturnsTwiceAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9256 | static ReturnsTwiceAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9257 | static ReturnsTwiceAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9258 | |
| 9259 | // Constructors |
| 9260 | ReturnsTwiceAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9261 | ); |
| 9262 | |
| 9263 | ReturnsTwiceAttr *clone(ASTContext &C) const; |
| 9264 | void printPretty(raw_ostream &OS, |
| 9265 | const PrintingPolicy &Policy) const; |
| 9266 | const char *getSpelling() const; |
| 9267 | |
| 9268 | |
| 9269 | static bool classof(const Attr *A) { return A->getKind() == attr::ReturnsTwice; } |
| 9270 | }; |
| 9271 | |
| 9272 | class SPtrAttr : public TypeAttr { |
| 9273 | public: |
| 9274 | // Factory methods |
| 9275 | static SPtrAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9276 | static SPtrAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9277 | static SPtrAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9278 | static SPtrAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9279 | |
| 9280 | // Constructors |
| 9281 | SPtrAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9282 | ); |
| 9283 | |
| 9284 | SPtrAttr *clone(ASTContext &C) const; |
| 9285 | void printPretty(raw_ostream &OS, |
| 9286 | const PrintingPolicy &Policy) const; |
| 9287 | const char *getSpelling() const; |
| 9288 | |
| 9289 | |
| 9290 | static bool classof(const Attr *A) { return A->getKind() == attr::SPtr; } |
| 9291 | }; |
| 9292 | |
| 9293 | class SYCLKernelAttr : public InheritableAttr { |
| 9294 | public: |
| 9295 | enum Spelling { |
| 9296 | GNU_sycl_kernel = 0, |
| 9297 | CXX11_clang_sycl_kernel = 1, |
| 9298 | C2x_clang_sycl_kernel = 2, |
| 9299 | SpellingNotCalculated = 15 |
| 9300 | |
| 9301 | }; |
| 9302 | |
| 9303 | // Factory methods |
| 9304 | static SYCLKernelAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9305 | static SYCLKernelAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9306 | static SYCLKernelAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9307 | static SYCLKernelAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9308 | |
| 9309 | // Constructors |
| 9310 | SYCLKernelAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9311 | ); |
| 9312 | |
| 9313 | SYCLKernelAttr *clone(ASTContext &C) const; |
| 9314 | void printPretty(raw_ostream &OS, |
| 9315 | const PrintingPolicy &Policy) const; |
| 9316 | const char *getSpelling() const; |
| 9317 | |
| 9318 | |
| 9319 | static bool classof(const Attr *A) { return A->getKind() == attr::SYCLKernel; } |
| 9320 | }; |
| 9321 | |
| 9322 | class ScopedLockableAttr : public InheritableAttr { |
| 9323 | public: |
| 9324 | enum Spelling { |
| 9325 | GNU_scoped_lockable = 0, |
| 9326 | CXX11_clang_scoped_lockable = 1, |
| 9327 | SpellingNotCalculated = 15 |
| 9328 | |
| 9329 | }; |
| 9330 | |
| 9331 | // Factory methods |
| 9332 | static ScopedLockableAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9333 | static ScopedLockableAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9334 | static ScopedLockableAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9335 | static ScopedLockableAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9336 | |
| 9337 | // Constructors |
| 9338 | ScopedLockableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9339 | ); |
| 9340 | |
| 9341 | ScopedLockableAttr *clone(ASTContext &C) const; |
| 9342 | void printPretty(raw_ostream &OS, |
| 9343 | const PrintingPolicy &Policy) const; |
| 9344 | const char *getSpelling() const; |
| 9345 | |
| 9346 | |
| 9347 | static bool classof(const Attr *A) { return A->getKind() == attr::ScopedLockable; } |
| 9348 | }; |
| 9349 | |
| 9350 | class SectionAttr : public InheritableAttr { |
| 9351 | unsigned nameLength; |
| 9352 | char *name; |
| 9353 | |
| 9354 | public: |
| 9355 | enum Spelling { |
| 9356 | GNU_section = 0, |
| 9357 | CXX11_gnu_section = 1, |
| 9358 | C2x_gnu_section = 2, |
| 9359 | Declspec_allocate = 3, |
| 9360 | SpellingNotCalculated = 15 |
| 9361 | |
| 9362 | }; |
| 9363 | |
| 9364 | // Factory methods |
| 9365 | static SectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9366 | static SectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo); |
| 9367 | static SectionAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax, SectionAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 9368 | static SectionAttr *Create(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax, SectionAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 9369 | |
| 9370 | // Constructors |
| 9371 | SectionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9372 | , llvm::StringRef Name |
| 9373 | ); |
| 9374 | |
| 9375 | SectionAttr *clone(ASTContext &C) const; |
| 9376 | void printPretty(raw_ostream &OS, |
| 9377 | const PrintingPolicy &Policy) const; |
| 9378 | const char *getSpelling() const; |
| 9379 | Spelling getSemanticSpelling() const; |
| 9380 | llvm::StringRef getName() const { |
| 9381 | return llvm::StringRef(name, nameLength); |
| 9382 | } |
| 9383 | unsigned getNameLength() const { |
| 9384 | return nameLength; |
| 9385 | } |
| 9386 | void setName(ASTContext &C, llvm::StringRef S) { |
| 9387 | nameLength = S.size(); |
| 9388 | this->name = new (C, 1) char [nameLength]; |
| 9389 | if (!S.empty()) |
| 9390 | std::memcpy(this->name, S.data(), nameLength); |
| 9391 | } |
| 9392 | |
| 9393 | |
| 9394 | |
| 9395 | static bool classof(const Attr *A) { return A->getKind() == attr::Section; } |
| 9396 | }; |
| 9397 | |
| 9398 | class SelectAnyAttr : public InheritableAttr { |
| 9399 | public: |
| 9400 | enum Spelling { |
| 9401 | Declspec_selectany = 0, |
| 9402 | GNU_selectany = 1, |
| 9403 | CXX11_gnu_selectany = 2, |
| 9404 | C2x_gnu_selectany = 3, |
| 9405 | SpellingNotCalculated = 15 |
| 9406 | |
| 9407 | }; |
| 9408 | |
| 9409 | // Factory methods |
| 9410 | static SelectAnyAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9411 | static SelectAnyAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9412 | static SelectAnyAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9413 | static SelectAnyAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9414 | |
| 9415 | // Constructors |
| 9416 | SelectAnyAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9417 | ); |
| 9418 | |
| 9419 | SelectAnyAttr *clone(ASTContext &C) const; |
| 9420 | void printPretty(raw_ostream &OS, |
| 9421 | const PrintingPolicy &Policy) const; |
| 9422 | const char *getSpelling() const; |
| 9423 | |
| 9424 | |
| 9425 | static bool classof(const Attr *A) { return A->getKind() == attr::SelectAny; } |
| 9426 | }; |
| 9427 | |
| 9428 | class SentinelAttr : public InheritableAttr { |
| 9429 | int sentinel; |
| 9430 | |
| 9431 | int nullPos; |
| 9432 | |
| 9433 | public: |
| 9434 | enum Spelling { |
| 9435 | GNU_sentinel = 0, |
| 9436 | CXX11_gnu_sentinel = 1, |
| 9437 | C2x_gnu_sentinel = 2, |
| 9438 | SpellingNotCalculated = 15 |
| 9439 | |
| 9440 | }; |
| 9441 | |
| 9442 | // Factory methods |
| 9443 | static SentinelAttr *CreateImplicit(ASTContext &Ctx, int Sentinel, int NullPos, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9444 | static SentinelAttr *Create(ASTContext &Ctx, int Sentinel, int NullPos, const AttributeCommonInfo &CommonInfo); |
| 9445 | static SentinelAttr *CreateImplicit(ASTContext &Ctx, int Sentinel, int NullPos, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9446 | static SentinelAttr *Create(ASTContext &Ctx, int Sentinel, int NullPos, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9447 | |
| 9448 | // Constructors |
| 9449 | SentinelAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9450 | , int Sentinel |
| 9451 | , int NullPos |
| 9452 | ); |
| 9453 | SentinelAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9454 | ); |
| 9455 | |
| 9456 | SentinelAttr *clone(ASTContext &C) const; |
| 9457 | void printPretty(raw_ostream &OS, |
| 9458 | const PrintingPolicy &Policy) const; |
| 9459 | const char *getSpelling() const; |
| 9460 | int getSentinel() const { |
| 9461 | return sentinel; |
| 9462 | } |
| 9463 | |
| 9464 | static const int DefaultSentinel = 0; |
| 9465 | |
| 9466 | int getNullPos() const { |
| 9467 | return nullPos; |
| 9468 | } |
| 9469 | |
| 9470 | static const int DefaultNullPos = 0; |
| 9471 | |
| 9472 | |
| 9473 | |
| 9474 | static bool classof(const Attr *A) { return A->getKind() == attr::Sentinel; } |
| 9475 | }; |
| 9476 | |
| 9477 | class SetTypestateAttr : public InheritableAttr { |
| 9478 | public: |
| 9479 | enum ConsumedState { |
| 9480 | Unknown, |
| 9481 | Consumed, |
| 9482 | Unconsumed |
| 9483 | }; |
| 9484 | private: |
| 9485 | ConsumedState newState; |
| 9486 | |
| 9487 | public: |
| 9488 | enum Spelling { |
| 9489 | GNU_set_typestate = 0, |
| 9490 | CXX11_clang_set_typestate = 1, |
| 9491 | SpellingNotCalculated = 15 |
| 9492 | |
| 9493 | }; |
| 9494 | |
| 9495 | // Factory methods |
| 9496 | static SetTypestateAttr *CreateImplicit(ASTContext &Ctx, ConsumedState NewState, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9497 | static SetTypestateAttr *Create(ASTContext &Ctx, ConsumedState NewState, const AttributeCommonInfo &CommonInfo); |
| 9498 | static SetTypestateAttr *CreateImplicit(ASTContext &Ctx, ConsumedState NewState, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9499 | static SetTypestateAttr *Create(ASTContext &Ctx, ConsumedState NewState, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9500 | |
| 9501 | // Constructors |
| 9502 | SetTypestateAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9503 | , ConsumedState NewState |
| 9504 | ); |
| 9505 | |
| 9506 | SetTypestateAttr *clone(ASTContext &C) const; |
| 9507 | void printPretty(raw_ostream &OS, |
| 9508 | const PrintingPolicy &Policy) const; |
| 9509 | const char *getSpelling() const; |
| 9510 | ConsumedState getNewState() const { |
| 9511 | return newState; |
| 9512 | } |
| 9513 | |
| 9514 | static bool ConvertStrToConsumedState(StringRef Val, ConsumedState &Out); |
| 9515 | static const char *ConvertConsumedStateToStr(ConsumedState Val); |
| 9516 | |
| 9517 | |
| 9518 | static bool classof(const Attr *A) { return A->getKind() == attr::SetTypestate; } |
| 9519 | }; |
| 9520 | |
| 9521 | class SharedTrylockFunctionAttr : public InheritableAttr { |
| 9522 | Expr * successValue; |
| 9523 | |
| 9524 | unsigned args_Size; |
| 9525 | Expr * *args_; |
| 9526 | |
| 9527 | public: |
| 9528 | // Factory methods |
| 9529 | static SharedTrylockFunctionAttr *CreateImplicit(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9530 | static SharedTrylockFunctionAttr *Create(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 9531 | static SharedTrylockFunctionAttr *CreateImplicit(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9532 | static SharedTrylockFunctionAttr *Create(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9533 | |
| 9534 | // Constructors |
| 9535 | SharedTrylockFunctionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9536 | , Expr * SuccessValue |
| 9537 | , Expr * *Args, unsigned ArgsSize |
| 9538 | ); |
| 9539 | SharedTrylockFunctionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9540 | , Expr * SuccessValue |
| 9541 | ); |
| 9542 | |
| 9543 | SharedTrylockFunctionAttr *clone(ASTContext &C) const; |
| 9544 | void printPretty(raw_ostream &OS, |
| 9545 | const PrintingPolicy &Policy) const; |
| 9546 | const char *getSpelling() const; |
| 9547 | Expr * getSuccessValue() const { |
| 9548 | return successValue; |
| 9549 | } |
| 9550 | |
| 9551 | typedef Expr ** args_iterator; |
| 9552 | args_iterator args_begin() const { return args_; } |
| 9553 | args_iterator args_end() const { return args_ + args_Size; } |
| 9554 | unsigned args_size() const { return args_Size; } |
| 9555 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 9556 | |
| 9557 | |
| 9558 | |
| 9559 | |
| 9560 | static bool classof(const Attr *A) { return A->getKind() == attr::SharedTrylockFunction; } |
| 9561 | }; |
| 9562 | |
| 9563 | class SpeculativeLoadHardeningAttr : public InheritableAttr { |
| 9564 | public: |
| 9565 | enum Spelling { |
| 9566 | GNU_speculative_load_hardening = 0, |
| 9567 | CXX11_clang_speculative_load_hardening = 1, |
| 9568 | C2x_clang_speculative_load_hardening = 2, |
| 9569 | SpellingNotCalculated = 15 |
| 9570 | |
| 9571 | }; |
| 9572 | |
| 9573 | // Factory methods |
| 9574 | static SpeculativeLoadHardeningAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9575 | static SpeculativeLoadHardeningAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9576 | static SpeculativeLoadHardeningAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9577 | static SpeculativeLoadHardeningAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9578 | |
| 9579 | // Constructors |
| 9580 | SpeculativeLoadHardeningAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9581 | ); |
| 9582 | |
| 9583 | SpeculativeLoadHardeningAttr *clone(ASTContext &C) const; |
| 9584 | void printPretty(raw_ostream &OS, |
| 9585 | const PrintingPolicy &Policy) const; |
| 9586 | const char *getSpelling() const; |
| 9587 | |
| 9588 | |
| 9589 | static bool classof(const Attr *A) { return A->getKind() == attr::SpeculativeLoadHardening; } |
| 9590 | }; |
| 9591 | |
| 9592 | class StdCallAttr : public InheritableAttr { |
| 9593 | public: |
| 9594 | enum Spelling { |
| 9595 | GNU_stdcall = 0, |
| 9596 | CXX11_gnu_stdcall = 1, |
| 9597 | C2x_gnu_stdcall = 2, |
| 9598 | Keyword_stdcall = 3, |
| 9599 | SpellingNotCalculated = 15 |
| 9600 | |
| 9601 | }; |
| 9602 | |
| 9603 | // Factory methods |
| 9604 | static StdCallAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9605 | static StdCallAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9606 | static StdCallAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9607 | static StdCallAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9608 | |
| 9609 | // Constructors |
| 9610 | StdCallAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9611 | ); |
| 9612 | |
| 9613 | StdCallAttr *clone(ASTContext &C) const; |
| 9614 | void printPretty(raw_ostream &OS, |
| 9615 | const PrintingPolicy &Policy) const; |
| 9616 | const char *getSpelling() const; |
| 9617 | |
| 9618 | |
| 9619 | static bool classof(const Attr *A) { return A->getKind() == attr::StdCall; } |
| 9620 | }; |
| 9621 | |
| 9622 | class StrictFPAttr : public InheritableAttr { |
| 9623 | public: |
| 9624 | // Factory methods |
| 9625 | static StrictFPAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9626 | static StrictFPAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9627 | static StrictFPAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9628 | static StrictFPAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9629 | |
| 9630 | // Constructors |
| 9631 | StrictFPAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9632 | ); |
| 9633 | |
| 9634 | StrictFPAttr *clone(ASTContext &C) const; |
| 9635 | void printPretty(raw_ostream &OS, |
| 9636 | const PrintingPolicy &Policy) const; |
| 9637 | const char *getSpelling() const; |
| 9638 | |
| 9639 | |
| 9640 | static bool classof(const Attr *A) { return A->getKind() == attr::StrictFP; } |
| 9641 | }; |
| 9642 | |
| 9643 | class SuppressAttr : public StmtAttr { |
| 9644 | unsigned diagnosticIdentifiers_Size; |
| 9645 | StringRef *diagnosticIdentifiers_; |
| 9646 | |
| 9647 | public: |
| 9648 | // Factory methods |
| 9649 | static SuppressAttr *CreateImplicit(ASTContext &Ctx, StringRef *DiagnosticIdentifiers, unsigned , const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9650 | static SuppressAttr *Create(ASTContext &Ctx, StringRef *DiagnosticIdentifiers, unsigned , const AttributeCommonInfo &CommonInfo); |
| 9651 | static SuppressAttr *CreateImplicit(ASTContext &Ctx, StringRef *DiagnosticIdentifiers, unsigned , SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9652 | static SuppressAttr *Create(ASTContext &Ctx, StringRef *DiagnosticIdentifiers, unsigned , SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9653 | |
| 9654 | // Constructors |
| 9655 | SuppressAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9656 | , StringRef *DiagnosticIdentifiers, unsigned |
| 9657 | ); |
| 9658 | SuppressAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9659 | ); |
| 9660 | |
| 9661 | SuppressAttr *clone(ASTContext &C) const; |
| 9662 | void printPretty(raw_ostream &OS, |
| 9663 | const PrintingPolicy &Policy) const; |
| 9664 | const char *getSpelling() const; |
| 9665 | typedef StringRef* diagnosticIdentifiers_iterator; |
| 9666 | diagnosticIdentifiers_iterator diagnosticIdentifiers_begin() const { return diagnosticIdentifiers_; } |
| 9667 | diagnosticIdentifiers_iterator diagnosticIdentifiers_end() const { return diagnosticIdentifiers_ + diagnosticIdentifiers_Size; } |
| 9668 | unsigned diagnosticIdentifiers_size() const { return diagnosticIdentifiers_Size; } |
| 9669 | llvm::iterator_range<diagnosticIdentifiers_iterator> diagnosticIdentifiers() const { return llvm::make_range(diagnosticIdentifiers_begin(), diagnosticIdentifiers_end()); } |
| 9670 | |
| 9671 | |
| 9672 | |
| 9673 | |
| 9674 | static bool classof(const Attr *A) { return A->getKind() == attr::Suppress; } |
| 9675 | }; |
| 9676 | |
| 9677 | class SwiftAsyncAttr : public InheritableAttr { |
| 9678 | public: |
| 9679 | enum Kind { |
| 9680 | None, |
| 9681 | SwiftPrivate, |
| 9682 | NotSwiftPrivate |
| 9683 | }; |
| 9684 | private: |
| 9685 | Kind kind; |
| 9686 | |
| 9687 | ParamIdx completionHandlerIndex; |
| 9688 | |
| 9689 | public: |
| 9690 | enum Spelling { |
| 9691 | GNU_swift_async = 0, |
| 9692 | CXX11_clang_swift_async = 1, |
| 9693 | C2x_clang_swift_async = 2, |
| 9694 | SpellingNotCalculated = 15 |
| 9695 | |
| 9696 | }; |
| 9697 | |
| 9698 | // Factory methods |
| 9699 | static SwiftAsyncAttr *CreateImplicit(ASTContext &Ctx, Kind Kind, ParamIdx CompletionHandlerIndex, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9700 | static SwiftAsyncAttr *Create(ASTContext &Ctx, Kind Kind, ParamIdx CompletionHandlerIndex, const AttributeCommonInfo &CommonInfo); |
| 9701 | static SwiftAsyncAttr *CreateImplicit(ASTContext &Ctx, Kind Kind, ParamIdx CompletionHandlerIndex, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9702 | static SwiftAsyncAttr *Create(ASTContext &Ctx, Kind Kind, ParamIdx CompletionHandlerIndex, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9703 | |
| 9704 | // Constructors |
| 9705 | SwiftAsyncAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9706 | , Kind Kind |
| 9707 | , ParamIdx CompletionHandlerIndex |
| 9708 | ); |
| 9709 | SwiftAsyncAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9710 | , Kind Kind |
| 9711 | ); |
| 9712 | |
| 9713 | SwiftAsyncAttr *clone(ASTContext &C) const; |
| 9714 | void printPretty(raw_ostream &OS, |
| 9715 | const PrintingPolicy &Policy) const; |
| 9716 | const char *getSpelling() const; |
| 9717 | Kind getKind() const { |
| 9718 | return kind; |
| 9719 | } |
| 9720 | |
| 9721 | static bool ConvertStrToKind(StringRef Val, Kind &Out); |
| 9722 | static const char *ConvertKindToStr(Kind Val); |
| 9723 | ParamIdx getCompletionHandlerIndex() const { |
| 9724 | return completionHandlerIndex; |
| 9725 | } |
| 9726 | |
| 9727 | |
| 9728 | |
| 9729 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftAsync; } |
| 9730 | }; |
| 9731 | |
| 9732 | class SwiftAsyncNameAttr : public InheritableAttr { |
| 9733 | unsigned nameLength; |
| 9734 | char *name; |
| 9735 | |
| 9736 | public: |
| 9737 | // Factory methods |
| 9738 | static SwiftAsyncNameAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9739 | static SwiftAsyncNameAttr *Create(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo); |
| 9740 | static SwiftAsyncNameAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9741 | static SwiftAsyncNameAttr *Create(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9742 | |
| 9743 | // Constructors |
| 9744 | SwiftAsyncNameAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9745 | , llvm::StringRef Name |
| 9746 | ); |
| 9747 | |
| 9748 | SwiftAsyncNameAttr *clone(ASTContext &C) const; |
| 9749 | void printPretty(raw_ostream &OS, |
| 9750 | const PrintingPolicy &Policy) const; |
| 9751 | const char *getSpelling() const; |
| 9752 | llvm::StringRef getName() const { |
| 9753 | return llvm::StringRef(name, nameLength); |
| 9754 | } |
| 9755 | unsigned getNameLength() const { |
| 9756 | return nameLength; |
| 9757 | } |
| 9758 | void setName(ASTContext &C, llvm::StringRef S) { |
| 9759 | nameLength = S.size(); |
| 9760 | this->name = new (C, 1) char [nameLength]; |
| 9761 | if (!S.empty()) |
| 9762 | std::memcpy(this->name, S.data(), nameLength); |
| 9763 | } |
| 9764 | |
| 9765 | |
| 9766 | |
| 9767 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftAsyncName; } |
| 9768 | }; |
| 9769 | |
| 9770 | class SwiftAttrAttr : public InheritableAttr { |
| 9771 | unsigned attributeLength; |
| 9772 | char *attribute; |
| 9773 | |
| 9774 | public: |
| 9775 | // Factory methods |
| 9776 | static SwiftAttrAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Attribute, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9777 | static SwiftAttrAttr *Create(ASTContext &Ctx, llvm::StringRef Attribute, const AttributeCommonInfo &CommonInfo); |
| 9778 | static SwiftAttrAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Attribute, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9779 | static SwiftAttrAttr *Create(ASTContext &Ctx, llvm::StringRef Attribute, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9780 | |
| 9781 | // Constructors |
| 9782 | SwiftAttrAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9783 | , llvm::StringRef Attribute |
| 9784 | ); |
| 9785 | |
| 9786 | SwiftAttrAttr *clone(ASTContext &C) const; |
| 9787 | void printPretty(raw_ostream &OS, |
| 9788 | const PrintingPolicy &Policy) const; |
| 9789 | const char *getSpelling() const; |
| 9790 | llvm::StringRef getAttribute() const { |
| 9791 | return llvm::StringRef(attribute, attributeLength); |
| 9792 | } |
| 9793 | unsigned getAttributeLength() const { |
| 9794 | return attributeLength; |
| 9795 | } |
| 9796 | void setAttribute(ASTContext &C, llvm::StringRef S) { |
| 9797 | attributeLength = S.size(); |
| 9798 | this->attribute = new (C, 1) char [attributeLength]; |
| 9799 | if (!S.empty()) |
| 9800 | std::memcpy(this->attribute, S.data(), attributeLength); |
| 9801 | } |
| 9802 | |
| 9803 | |
| 9804 | |
| 9805 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftAttr; } |
| 9806 | }; |
| 9807 | |
| 9808 | class SwiftBridgeAttr : public InheritableAttr { |
| 9809 | unsigned swiftTypeLength; |
| 9810 | char *swiftType; |
| 9811 | |
| 9812 | public: |
| 9813 | // Factory methods |
| 9814 | static SwiftBridgeAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef SwiftType, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9815 | static SwiftBridgeAttr *Create(ASTContext &Ctx, llvm::StringRef SwiftType, const AttributeCommonInfo &CommonInfo); |
| 9816 | static SwiftBridgeAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef SwiftType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9817 | static SwiftBridgeAttr *Create(ASTContext &Ctx, llvm::StringRef SwiftType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9818 | |
| 9819 | // Constructors |
| 9820 | SwiftBridgeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9821 | , llvm::StringRef SwiftType |
| 9822 | ); |
| 9823 | |
| 9824 | SwiftBridgeAttr *clone(ASTContext &C) const; |
| 9825 | void printPretty(raw_ostream &OS, |
| 9826 | const PrintingPolicy &Policy) const; |
| 9827 | const char *getSpelling() const; |
| 9828 | llvm::StringRef getSwiftType() const { |
| 9829 | return llvm::StringRef(swiftType, swiftTypeLength); |
| 9830 | } |
| 9831 | unsigned getSwiftTypeLength() const { |
| 9832 | return swiftTypeLength; |
| 9833 | } |
| 9834 | void setSwiftType(ASTContext &C, llvm::StringRef S) { |
| 9835 | swiftTypeLength = S.size(); |
| 9836 | this->swiftType = new (C, 1) char [swiftTypeLength]; |
| 9837 | if (!S.empty()) |
| 9838 | std::memcpy(this->swiftType, S.data(), swiftTypeLength); |
| 9839 | } |
| 9840 | |
| 9841 | |
| 9842 | |
| 9843 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftBridge; } |
| 9844 | }; |
| 9845 | |
| 9846 | class SwiftBridgedTypedefAttr : public InheritableAttr { |
| 9847 | public: |
| 9848 | // Factory methods |
| 9849 | static SwiftBridgedTypedefAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9850 | static SwiftBridgedTypedefAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9851 | static SwiftBridgedTypedefAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9852 | static SwiftBridgedTypedefAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9853 | |
| 9854 | // Constructors |
| 9855 | SwiftBridgedTypedefAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9856 | ); |
| 9857 | |
| 9858 | SwiftBridgedTypedefAttr *clone(ASTContext &C) const; |
| 9859 | void printPretty(raw_ostream &OS, |
| 9860 | const PrintingPolicy &Policy) const; |
| 9861 | const char *getSpelling() const; |
| 9862 | |
| 9863 | |
| 9864 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftBridgedTypedef; } |
| 9865 | }; |
| 9866 | |
| 9867 | class SwiftCallAttr : public InheritableAttr { |
| 9868 | public: |
| 9869 | enum Spelling { |
| 9870 | GNU_swiftcall = 0, |
| 9871 | CXX11_clang_swiftcall = 1, |
| 9872 | C2x_clang_swiftcall = 2, |
| 9873 | SpellingNotCalculated = 15 |
| 9874 | |
| 9875 | }; |
| 9876 | |
| 9877 | // Factory methods |
| 9878 | static SwiftCallAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9879 | static SwiftCallAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9880 | static SwiftCallAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9881 | static SwiftCallAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9882 | |
| 9883 | // Constructors |
| 9884 | SwiftCallAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9885 | ); |
| 9886 | |
| 9887 | SwiftCallAttr *clone(ASTContext &C) const; |
| 9888 | void printPretty(raw_ostream &OS, |
| 9889 | const PrintingPolicy &Policy) const; |
| 9890 | const char *getSpelling() const; |
| 9891 | |
| 9892 | |
| 9893 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftCall; } |
| 9894 | }; |
| 9895 | |
| 9896 | class SwiftContextAttr : public ParameterABIAttr { |
| 9897 | public: |
| 9898 | enum Spelling { |
| 9899 | GNU_swift_context = 0, |
| 9900 | CXX11_clang_swift_context = 1, |
| 9901 | C2x_clang_swift_context = 2, |
| 9902 | SpellingNotCalculated = 15 |
| 9903 | |
| 9904 | }; |
| 9905 | |
| 9906 | // Factory methods |
| 9907 | static SwiftContextAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9908 | static SwiftContextAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9909 | static SwiftContextAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9910 | static SwiftContextAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9911 | |
| 9912 | // Constructors |
| 9913 | SwiftContextAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9914 | ); |
| 9915 | |
| 9916 | SwiftContextAttr *clone(ASTContext &C) const; |
| 9917 | void printPretty(raw_ostream &OS, |
| 9918 | const PrintingPolicy &Policy) const; |
| 9919 | const char *getSpelling() const; |
| 9920 | |
| 9921 | |
| 9922 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftContext; } |
| 9923 | }; |
| 9924 | |
| 9925 | class SwiftErrorAttr : public InheritableAttr { |
| 9926 | public: |
| 9927 | enum ConventionKind { |
| 9928 | None, |
| 9929 | NonNullError, |
| 9930 | NullResult, |
| 9931 | ZeroResult, |
| 9932 | NonZeroResult |
| 9933 | }; |
| 9934 | private: |
| 9935 | ConventionKind convention; |
| 9936 | |
| 9937 | public: |
| 9938 | // Factory methods |
| 9939 | static SwiftErrorAttr *CreateImplicit(ASTContext &Ctx, ConventionKind Convention, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9940 | static SwiftErrorAttr *Create(ASTContext &Ctx, ConventionKind Convention, const AttributeCommonInfo &CommonInfo); |
| 9941 | static SwiftErrorAttr *CreateImplicit(ASTContext &Ctx, ConventionKind Convention, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9942 | static SwiftErrorAttr *Create(ASTContext &Ctx, ConventionKind Convention, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9943 | |
| 9944 | // Constructors |
| 9945 | SwiftErrorAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9946 | , ConventionKind Convention |
| 9947 | ); |
| 9948 | |
| 9949 | SwiftErrorAttr *clone(ASTContext &C) const; |
| 9950 | void printPretty(raw_ostream &OS, |
| 9951 | const PrintingPolicy &Policy) const; |
| 9952 | const char *getSpelling() const; |
| 9953 | ConventionKind getConvention() const { |
| 9954 | return convention; |
| 9955 | } |
| 9956 | |
| 9957 | static bool ConvertStrToConventionKind(StringRef Val, ConventionKind &Out); |
| 9958 | static const char *ConvertConventionKindToStr(ConventionKind Val); |
| 9959 | |
| 9960 | |
| 9961 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftError; } |
| 9962 | }; |
| 9963 | |
| 9964 | class SwiftErrorResultAttr : public ParameterABIAttr { |
| 9965 | public: |
| 9966 | enum Spelling { |
| 9967 | GNU_swift_error_result = 0, |
| 9968 | CXX11_clang_swift_error_result = 1, |
| 9969 | C2x_clang_swift_error_result = 2, |
| 9970 | SpellingNotCalculated = 15 |
| 9971 | |
| 9972 | }; |
| 9973 | |
| 9974 | // Factory methods |
| 9975 | static SwiftErrorResultAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 9976 | static SwiftErrorResultAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 9977 | static SwiftErrorResultAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9978 | static SwiftErrorResultAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 9979 | |
| 9980 | // Constructors |
| 9981 | SwiftErrorResultAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 9982 | ); |
| 9983 | |
| 9984 | SwiftErrorResultAttr *clone(ASTContext &C) const; |
| 9985 | void printPretty(raw_ostream &OS, |
| 9986 | const PrintingPolicy &Policy) const; |
| 9987 | const char *getSpelling() const; |
| 9988 | |
| 9989 | |
| 9990 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftErrorResult; } |
| 9991 | }; |
| 9992 | |
| 9993 | class SwiftIndirectResultAttr : public ParameterABIAttr { |
| 9994 | public: |
| 9995 | enum Spelling { |
| 9996 | GNU_swift_indirect_result = 0, |
| 9997 | CXX11_clang_swift_indirect_result = 1, |
| 9998 | C2x_clang_swift_indirect_result = 2, |
| 9999 | SpellingNotCalculated = 15 |
| 10000 | |
| 10001 | }; |
| 10002 | |
| 10003 | // Factory methods |
| 10004 | static SwiftIndirectResultAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10005 | static SwiftIndirectResultAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10006 | static SwiftIndirectResultAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10007 | static SwiftIndirectResultAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10008 | |
| 10009 | // Constructors |
| 10010 | SwiftIndirectResultAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10011 | ); |
| 10012 | |
| 10013 | SwiftIndirectResultAttr *clone(ASTContext &C) const; |
| 10014 | void printPretty(raw_ostream &OS, |
| 10015 | const PrintingPolicy &Policy) const; |
| 10016 | const char *getSpelling() const; |
| 10017 | |
| 10018 | |
| 10019 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftIndirectResult; } |
| 10020 | }; |
| 10021 | |
| 10022 | class SwiftNameAttr : public InheritableAttr { |
| 10023 | unsigned nameLength; |
| 10024 | char *name; |
| 10025 | |
| 10026 | public: |
| 10027 | // Factory methods |
| 10028 | static SwiftNameAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10029 | static SwiftNameAttr *Create(ASTContext &Ctx, llvm::StringRef Name, const AttributeCommonInfo &CommonInfo); |
| 10030 | static SwiftNameAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10031 | static SwiftNameAttr *Create(ASTContext &Ctx, llvm::StringRef Name, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10032 | |
| 10033 | // Constructors |
| 10034 | SwiftNameAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10035 | , llvm::StringRef Name |
| 10036 | ); |
| 10037 | |
| 10038 | SwiftNameAttr *clone(ASTContext &C) const; |
| 10039 | void printPretty(raw_ostream &OS, |
| 10040 | const PrintingPolicy &Policy) const; |
| 10041 | const char *getSpelling() const; |
| 10042 | llvm::StringRef getName() const { |
| 10043 | return llvm::StringRef(name, nameLength); |
| 10044 | } |
| 10045 | unsigned getNameLength() const { |
| 10046 | return nameLength; |
| 10047 | } |
| 10048 | void setName(ASTContext &C, llvm::StringRef S) { |
| 10049 | nameLength = S.size(); |
| 10050 | this->name = new (C, 1) char [nameLength]; |
| 10051 | if (!S.empty()) |
| 10052 | std::memcpy(this->name, S.data(), nameLength); |
| 10053 | } |
| 10054 | |
| 10055 | |
| 10056 | |
| 10057 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftName; } |
| 10058 | }; |
| 10059 | |
| 10060 | class SwiftNewTypeAttr : public InheritableAttr { |
| 10061 | public: |
| 10062 | enum NewtypeKind { |
| 10063 | NK_Struct, |
| 10064 | NK_Enum |
| 10065 | }; |
| 10066 | private: |
| 10067 | NewtypeKind newtypeKind; |
| 10068 | |
| 10069 | public: |
| 10070 | enum Spelling { |
| 10071 | GNU_swift_newtype = 0, |
| 10072 | GNU_swift_wrapper = 1, |
| 10073 | SpellingNotCalculated = 15 |
| 10074 | |
| 10075 | }; |
| 10076 | |
| 10077 | // Factory methods |
| 10078 | static SwiftNewTypeAttr *CreateImplicit(ASTContext &Ctx, NewtypeKind NewtypeKind, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10079 | static SwiftNewTypeAttr *Create(ASTContext &Ctx, NewtypeKind NewtypeKind, const AttributeCommonInfo &CommonInfo); |
| 10080 | static SwiftNewTypeAttr *CreateImplicit(ASTContext &Ctx, NewtypeKind NewtypeKind, SourceRange Range, AttributeCommonInfo::Syntax Syntax, SwiftNewTypeAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 10081 | static SwiftNewTypeAttr *Create(ASTContext &Ctx, NewtypeKind NewtypeKind, SourceRange Range, AttributeCommonInfo::Syntax Syntax, SwiftNewTypeAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 10082 | |
| 10083 | // Constructors |
| 10084 | SwiftNewTypeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10085 | , NewtypeKind NewtypeKind |
| 10086 | ); |
| 10087 | |
| 10088 | SwiftNewTypeAttr *clone(ASTContext &C) const; |
| 10089 | void printPretty(raw_ostream &OS, |
| 10090 | const PrintingPolicy &Policy) const; |
| 10091 | const char *getSpelling() const; |
| 10092 | Spelling getSemanticSpelling() const; |
| 10093 | NewtypeKind getNewtypeKind() const { |
| 10094 | return newtypeKind; |
| 10095 | } |
| 10096 | |
| 10097 | static bool ConvertStrToNewtypeKind(StringRef Val, NewtypeKind &Out); |
| 10098 | static const char *ConvertNewtypeKindToStr(NewtypeKind Val); |
| 10099 | |
| 10100 | |
| 10101 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftNewType; } |
| 10102 | }; |
| 10103 | |
| 10104 | class SwiftObjCMembersAttr : public Attr { |
| 10105 | public: |
| 10106 | // Factory methods |
| 10107 | static SwiftObjCMembersAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10108 | static SwiftObjCMembersAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10109 | static SwiftObjCMembersAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10110 | static SwiftObjCMembersAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10111 | |
| 10112 | // Constructors |
| 10113 | SwiftObjCMembersAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10114 | ); |
| 10115 | |
| 10116 | SwiftObjCMembersAttr *clone(ASTContext &C) const; |
| 10117 | void printPretty(raw_ostream &OS, |
| 10118 | const PrintingPolicy &Policy) const; |
| 10119 | const char *getSpelling() const; |
| 10120 | |
| 10121 | |
| 10122 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftObjCMembers; } |
| 10123 | }; |
| 10124 | |
| 10125 | class SwiftPrivateAttr : public InheritableAttr { |
| 10126 | public: |
| 10127 | // Factory methods |
| 10128 | static SwiftPrivateAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10129 | static SwiftPrivateAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10130 | static SwiftPrivateAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10131 | static SwiftPrivateAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10132 | |
| 10133 | // Constructors |
| 10134 | SwiftPrivateAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10135 | ); |
| 10136 | |
| 10137 | SwiftPrivateAttr *clone(ASTContext &C) const; |
| 10138 | void printPretty(raw_ostream &OS, |
| 10139 | const PrintingPolicy &Policy) const; |
| 10140 | const char *getSpelling() const; |
| 10141 | |
| 10142 | |
| 10143 | static bool classof(const Attr *A) { return A->getKind() == attr::SwiftPrivate; } |
| 10144 | }; |
| 10145 | |
| 10146 | class SysVABIAttr : public InheritableAttr { |
| 10147 | public: |
| 10148 | enum Spelling { |
| 10149 | GNU_sysv_abi = 0, |
| 10150 | CXX11_gnu_sysv_abi = 1, |
| 10151 | C2x_gnu_sysv_abi = 2, |
| 10152 | SpellingNotCalculated = 15 |
| 10153 | |
| 10154 | }; |
| 10155 | |
| 10156 | // Factory methods |
| 10157 | static SysVABIAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10158 | static SysVABIAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10159 | static SysVABIAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10160 | static SysVABIAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10161 | |
| 10162 | // Constructors |
| 10163 | SysVABIAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10164 | ); |
| 10165 | |
| 10166 | SysVABIAttr *clone(ASTContext &C) const; |
| 10167 | void printPretty(raw_ostream &OS, |
| 10168 | const PrintingPolicy &Policy) const; |
| 10169 | const char *getSpelling() const; |
| 10170 | |
| 10171 | |
| 10172 | static bool classof(const Attr *A) { return A->getKind() == attr::SysVABI; } |
| 10173 | }; |
| 10174 | |
| 10175 | class TLSModelAttr : public InheritableAttr { |
| 10176 | unsigned modelLength; |
| 10177 | char *model; |
| 10178 | |
| 10179 | public: |
| 10180 | enum Spelling { |
| 10181 | GNU_tls_model = 0, |
| 10182 | CXX11_gnu_tls_model = 1, |
| 10183 | C2x_gnu_tls_model = 2, |
| 10184 | SpellingNotCalculated = 15 |
| 10185 | |
| 10186 | }; |
| 10187 | |
| 10188 | // Factory methods |
| 10189 | static TLSModelAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Model, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10190 | static TLSModelAttr *Create(ASTContext &Ctx, llvm::StringRef Model, const AttributeCommonInfo &CommonInfo); |
| 10191 | static TLSModelAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Model, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10192 | static TLSModelAttr *Create(ASTContext &Ctx, llvm::StringRef Model, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10193 | |
| 10194 | // Constructors |
| 10195 | TLSModelAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10196 | , llvm::StringRef Model |
| 10197 | ); |
| 10198 | |
| 10199 | TLSModelAttr *clone(ASTContext &C) const; |
| 10200 | void printPretty(raw_ostream &OS, |
| 10201 | const PrintingPolicy &Policy) const; |
| 10202 | const char *getSpelling() const; |
| 10203 | llvm::StringRef getModel() const { |
| 10204 | return llvm::StringRef(model, modelLength); |
| 10205 | } |
| 10206 | unsigned getModelLength() const { |
| 10207 | return modelLength; |
| 10208 | } |
| 10209 | void setModel(ASTContext &C, llvm::StringRef S) { |
| 10210 | modelLength = S.size(); |
| 10211 | this->model = new (C, 1) char [modelLength]; |
| 10212 | if (!S.empty()) |
| 10213 | std::memcpy(this->model, S.data(), modelLength); |
| 10214 | } |
| 10215 | |
| 10216 | |
| 10217 | |
| 10218 | static bool classof(const Attr *A) { return A->getKind() == attr::TLSModel; } |
| 10219 | }; |
| 10220 | |
| 10221 | class TargetAttr : public InheritableAttr { |
| 10222 | unsigned featuresStrLength; |
| 10223 | char *featuresStr; |
| 10224 | |
| 10225 | public: |
| 10226 | enum Spelling { |
| 10227 | GNU_target = 0, |
| 10228 | CXX11_gnu_target = 1, |
| 10229 | C2x_gnu_target = 2, |
| 10230 | SpellingNotCalculated = 15 |
| 10231 | |
| 10232 | }; |
| 10233 | |
| 10234 | // Factory methods |
| 10235 | static TargetAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef FeaturesStr, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10236 | static TargetAttr *Create(ASTContext &Ctx, llvm::StringRef FeaturesStr, const AttributeCommonInfo &CommonInfo); |
| 10237 | static TargetAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef FeaturesStr, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10238 | static TargetAttr *Create(ASTContext &Ctx, llvm::StringRef FeaturesStr, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10239 | |
| 10240 | // Constructors |
| 10241 | TargetAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10242 | , llvm::StringRef FeaturesStr |
| 10243 | ); |
| 10244 | |
| 10245 | TargetAttr *clone(ASTContext &C) const; |
| 10246 | void printPretty(raw_ostream &OS, |
| 10247 | const PrintingPolicy &Policy) const; |
| 10248 | const char *getSpelling() const; |
| 10249 | llvm::StringRef getFeaturesStr() const { |
| 10250 | return llvm::StringRef(featuresStr, featuresStrLength); |
| 10251 | } |
| 10252 | unsigned getFeaturesStrLength() const { |
| 10253 | return featuresStrLength; |
| 10254 | } |
| 10255 | void setFeaturesStr(ASTContext &C, llvm::StringRef S) { |
| 10256 | featuresStrLength = S.size(); |
| 10257 | this->featuresStr = new (C, 1) char [featuresStrLength]; |
| 10258 | if (!S.empty()) |
| 10259 | std::memcpy(this->featuresStr, S.data(), featuresStrLength); |
| 10260 | } |
| 10261 | |
| 10262 | |
| 10263 | ParsedTargetAttr parse() const { |
| 10264 | return parse(getFeaturesStr()); |
| 10265 | } |
| 10266 | |
| 10267 | StringRef getArchitecture() const { |
| 10268 | StringRef Features = getFeaturesStr(); |
| 10269 | if (Features == "default" ) return {}; |
| 10270 | |
| 10271 | SmallVector<StringRef, 1> AttrFeatures; |
| 10272 | Features.split(AttrFeatures, "," ); |
| 10273 | |
| 10274 | for (auto &Feature : AttrFeatures) { |
| 10275 | Feature = Feature.trim(); |
| 10276 | if (Feature.startswith("arch=" )) |
| 10277 | return Feature.drop_front(sizeof("arch=" ) - 1); |
| 10278 | } |
| 10279 | return "" ; |
| 10280 | } |
| 10281 | |
| 10282 | // Gets the list of features as simple string-refs with no +/- or 'no-'. |
| 10283 | // Only adds the items to 'Out' that are additions. |
| 10284 | void getAddedFeatures(llvm::SmallVectorImpl<StringRef> &Out) const { |
| 10285 | StringRef Features = getFeaturesStr(); |
| 10286 | if (Features == "default" ) return; |
| 10287 | |
| 10288 | SmallVector<StringRef, 1> AttrFeatures; |
| 10289 | Features.split(AttrFeatures, "," ); |
| 10290 | |
| 10291 | for (auto &Feature : AttrFeatures) { |
| 10292 | Feature = Feature.trim(); |
| 10293 | |
| 10294 | if (!Feature.startswith("no-" ) && !Feature.startswith("arch=" ) && |
| 10295 | !Feature.startswith("fpmath=" ) && !Feature.startswith("tune=" )) |
| 10296 | Out.push_back(Feature); |
| 10297 | } |
| 10298 | } |
| 10299 | |
| 10300 | template<class Compare> |
| 10301 | ParsedTargetAttr parse(Compare cmp) const { |
| 10302 | ParsedTargetAttr Attrs = parse(); |
| 10303 | llvm::sort(std::begin(Attrs.Features), std::end(Attrs.Features), cmp); |
| 10304 | return Attrs; |
| 10305 | } |
| 10306 | |
| 10307 | bool isDefaultVersion() const { return getFeaturesStr() == "default" ; } |
| 10308 | |
| 10309 | static ParsedTargetAttr parse(StringRef Features) { |
| 10310 | ParsedTargetAttr Ret; |
| 10311 | if (Features == "default" ) return Ret; |
| 10312 | SmallVector<StringRef, 1> AttrFeatures; |
| 10313 | Features.split(AttrFeatures, "," ); |
| 10314 | |
| 10315 | // Grab the various features and prepend a "+" to turn on the feature to |
| 10316 | // the backend and add them to our existing set of features. |
| 10317 | for (auto &Feature : AttrFeatures) { |
| 10318 | // Go ahead and trim whitespace rather than either erroring or |
| 10319 | // accepting it weirdly. |
| 10320 | Feature = Feature.trim(); |
| 10321 | |
| 10322 | // TODO: Support the fpmath option. It will require checking |
| 10323 | // overall feature validity for the function with the rest of the |
| 10324 | // attributes on the function. |
| 10325 | if (Feature.startswith("fpmath=" )) |
| 10326 | continue; |
| 10327 | |
| 10328 | if (Feature.startswith("branch-protection=" )) { |
| 10329 | Ret.BranchProtection = Feature.split('=').second.trim(); |
| 10330 | continue; |
| 10331 | } |
| 10332 | |
| 10333 | // While we're here iterating check for a different target cpu. |
| 10334 | if (Feature.startswith("arch=" )) { |
| 10335 | if (!Ret.Architecture.empty()) |
| 10336 | Ret.DuplicateArchitecture = true; |
| 10337 | else |
| 10338 | Ret.Architecture = Feature.split("=" ).second.trim(); |
| 10339 | } else if (Feature.startswith("tune=" )) { |
| 10340 | if (!Ret.Tune.empty()) |
| 10341 | Ret.DuplicateTune = true; |
| 10342 | else |
| 10343 | Ret.Tune = Feature.split("=" ).second.trim(); |
| 10344 | } else if (Feature.startswith("no-" )) |
| 10345 | Ret.Features.push_back("-" + Feature.split("-" ).second.str()); |
| 10346 | else |
| 10347 | Ret.Features.push_back("+" + Feature.str()); |
| 10348 | } |
| 10349 | return Ret; |
| 10350 | } |
| 10351 | |
| 10352 | |
| 10353 | static bool classof(const Attr *A) { return A->getKind() == attr::Target; } |
| 10354 | }; |
| 10355 | |
| 10356 | class TestTypestateAttr : public InheritableAttr { |
| 10357 | public: |
| 10358 | enum ConsumedState { |
| 10359 | Consumed, |
| 10360 | Unconsumed |
| 10361 | }; |
| 10362 | private: |
| 10363 | ConsumedState testState; |
| 10364 | |
| 10365 | public: |
| 10366 | enum Spelling { |
| 10367 | GNU_test_typestate = 0, |
| 10368 | CXX11_clang_test_typestate = 1, |
| 10369 | SpellingNotCalculated = 15 |
| 10370 | |
| 10371 | }; |
| 10372 | |
| 10373 | // Factory methods |
| 10374 | static TestTypestateAttr *CreateImplicit(ASTContext &Ctx, ConsumedState TestState, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10375 | static TestTypestateAttr *Create(ASTContext &Ctx, ConsumedState TestState, const AttributeCommonInfo &CommonInfo); |
| 10376 | static TestTypestateAttr *CreateImplicit(ASTContext &Ctx, ConsumedState TestState, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10377 | static TestTypestateAttr *Create(ASTContext &Ctx, ConsumedState TestState, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10378 | |
| 10379 | // Constructors |
| 10380 | TestTypestateAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10381 | , ConsumedState TestState |
| 10382 | ); |
| 10383 | |
| 10384 | TestTypestateAttr *clone(ASTContext &C) const; |
| 10385 | void printPretty(raw_ostream &OS, |
| 10386 | const PrintingPolicy &Policy) const; |
| 10387 | const char *getSpelling() const; |
| 10388 | ConsumedState getTestState() const { |
| 10389 | return testState; |
| 10390 | } |
| 10391 | |
| 10392 | static bool ConvertStrToConsumedState(StringRef Val, ConsumedState &Out); |
| 10393 | static const char *ConvertConsumedStateToStr(ConsumedState Val); |
| 10394 | |
| 10395 | |
| 10396 | static bool classof(const Attr *A) { return A->getKind() == attr::TestTypestate; } |
| 10397 | }; |
| 10398 | |
| 10399 | class ThisCallAttr : public InheritableAttr { |
| 10400 | public: |
| 10401 | enum Spelling { |
| 10402 | GNU_thiscall = 0, |
| 10403 | CXX11_gnu_thiscall = 1, |
| 10404 | C2x_gnu_thiscall = 2, |
| 10405 | Keyword_thiscall = 3, |
| 10406 | SpellingNotCalculated = 15 |
| 10407 | |
| 10408 | }; |
| 10409 | |
| 10410 | // Factory methods |
| 10411 | static ThisCallAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10412 | static ThisCallAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10413 | static ThisCallAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10414 | static ThisCallAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10415 | |
| 10416 | // Constructors |
| 10417 | ThisCallAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10418 | ); |
| 10419 | |
| 10420 | ThisCallAttr *clone(ASTContext &C) const; |
| 10421 | void printPretty(raw_ostream &OS, |
| 10422 | const PrintingPolicy &Policy) const; |
| 10423 | const char *getSpelling() const; |
| 10424 | |
| 10425 | |
| 10426 | static bool classof(const Attr *A) { return A->getKind() == attr::ThisCall; } |
| 10427 | }; |
| 10428 | |
| 10429 | class ThreadAttr : public Attr { |
| 10430 | public: |
| 10431 | // Factory methods |
| 10432 | static ThreadAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10433 | static ThreadAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10434 | static ThreadAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10435 | static ThreadAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10436 | |
| 10437 | // Constructors |
| 10438 | ThreadAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10439 | ); |
| 10440 | |
| 10441 | ThreadAttr *clone(ASTContext &C) const; |
| 10442 | void printPretty(raw_ostream &OS, |
| 10443 | const PrintingPolicy &Policy) const; |
| 10444 | const char *getSpelling() const; |
| 10445 | |
| 10446 | |
| 10447 | static bool classof(const Attr *A) { return A->getKind() == attr::Thread; } |
| 10448 | }; |
| 10449 | |
| 10450 | class TransparentUnionAttr : public InheritableAttr { |
| 10451 | public: |
| 10452 | enum Spelling { |
| 10453 | GNU_transparent_union = 0, |
| 10454 | CXX11_gnu_transparent_union = 1, |
| 10455 | C2x_gnu_transparent_union = 2, |
| 10456 | SpellingNotCalculated = 15 |
| 10457 | |
| 10458 | }; |
| 10459 | |
| 10460 | // Factory methods |
| 10461 | static TransparentUnionAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10462 | static TransparentUnionAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10463 | static TransparentUnionAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10464 | static TransparentUnionAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10465 | |
| 10466 | // Constructors |
| 10467 | TransparentUnionAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10468 | ); |
| 10469 | |
| 10470 | TransparentUnionAttr *clone(ASTContext &C) const; |
| 10471 | void printPretty(raw_ostream &OS, |
| 10472 | const PrintingPolicy &Policy) const; |
| 10473 | const char *getSpelling() const; |
| 10474 | |
| 10475 | |
| 10476 | static bool classof(const Attr *A) { return A->getKind() == attr::TransparentUnion; } |
| 10477 | }; |
| 10478 | |
| 10479 | class TrivialABIAttr : public InheritableAttr { |
| 10480 | public: |
| 10481 | enum Spelling { |
| 10482 | GNU_trivial_abi = 0, |
| 10483 | CXX11_clang_trivial_abi = 1, |
| 10484 | SpellingNotCalculated = 15 |
| 10485 | |
| 10486 | }; |
| 10487 | |
| 10488 | // Factory methods |
| 10489 | static TrivialABIAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10490 | static TrivialABIAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10491 | static TrivialABIAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10492 | static TrivialABIAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10493 | |
| 10494 | // Constructors |
| 10495 | TrivialABIAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10496 | ); |
| 10497 | |
| 10498 | TrivialABIAttr *clone(ASTContext &C) const; |
| 10499 | void printPretty(raw_ostream &OS, |
| 10500 | const PrintingPolicy &Policy) const; |
| 10501 | const char *getSpelling() const; |
| 10502 | |
| 10503 | |
| 10504 | static bool classof(const Attr *A) { return A->getKind() == attr::TrivialABI; } |
| 10505 | }; |
| 10506 | |
| 10507 | class TryAcquireCapabilityAttr : public InheritableAttr { |
| 10508 | Expr * successValue; |
| 10509 | |
| 10510 | unsigned args_Size; |
| 10511 | Expr * *args_; |
| 10512 | |
| 10513 | public: |
| 10514 | enum Spelling { |
| 10515 | GNU_try_acquire_capability = 0, |
| 10516 | CXX11_clang_try_acquire_capability = 1, |
| 10517 | GNU_try_acquire_shared_capability = 2, |
| 10518 | CXX11_clang_try_acquire_shared_capability = 3, |
| 10519 | SpellingNotCalculated = 15 |
| 10520 | |
| 10521 | }; |
| 10522 | |
| 10523 | // Factory methods |
| 10524 | static TryAcquireCapabilityAttr *CreateImplicit(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10525 | static TryAcquireCapabilityAttr *Create(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, const AttributeCommonInfo &CommonInfo); |
| 10526 | static TryAcquireCapabilityAttr *CreateImplicit(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, TryAcquireCapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 10527 | static TryAcquireCapabilityAttr *Create(ASTContext &Ctx, Expr * SuccessValue, Expr * *Args, unsigned ArgsSize, SourceRange Range, AttributeCommonInfo::Syntax Syntax, TryAcquireCapabilityAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 10528 | |
| 10529 | // Constructors |
| 10530 | TryAcquireCapabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10531 | , Expr * SuccessValue |
| 10532 | , Expr * *Args, unsigned ArgsSize |
| 10533 | ); |
| 10534 | TryAcquireCapabilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10535 | , Expr * SuccessValue |
| 10536 | ); |
| 10537 | |
| 10538 | TryAcquireCapabilityAttr *clone(ASTContext &C) const; |
| 10539 | void printPretty(raw_ostream &OS, |
| 10540 | const PrintingPolicy &Policy) const; |
| 10541 | const char *getSpelling() const; |
| 10542 | Spelling getSemanticSpelling() const; |
| 10543 | bool isShared() const { return getAttributeSpellingListIndex() == 2 || |
| 10544 | getAttributeSpellingListIndex() == 3; } |
| 10545 | Expr * getSuccessValue() const { |
| 10546 | return successValue; |
| 10547 | } |
| 10548 | |
| 10549 | typedef Expr ** args_iterator; |
| 10550 | args_iterator args_begin() const { return args_; } |
| 10551 | args_iterator args_end() const { return args_ + args_Size; } |
| 10552 | unsigned args_size() const { return args_Size; } |
| 10553 | llvm::iterator_range<args_iterator> args() const { return llvm::make_range(args_begin(), args_end()); } |
| 10554 | |
| 10555 | |
| 10556 | |
| 10557 | |
| 10558 | static bool classof(const Attr *A) { return A->getKind() == attr::TryAcquireCapability; } |
| 10559 | }; |
| 10560 | |
| 10561 | class TypeNonNullAttr : public TypeAttr { |
| 10562 | public: |
| 10563 | // Factory methods |
| 10564 | static TypeNonNullAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10565 | static TypeNonNullAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10566 | static TypeNonNullAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10567 | static TypeNonNullAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10568 | |
| 10569 | // Constructors |
| 10570 | TypeNonNullAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10571 | ); |
| 10572 | |
| 10573 | TypeNonNullAttr *clone(ASTContext &C) const; |
| 10574 | void printPretty(raw_ostream &OS, |
| 10575 | const PrintingPolicy &Policy) const; |
| 10576 | const char *getSpelling() const; |
| 10577 | |
| 10578 | |
| 10579 | static bool classof(const Attr *A) { return A->getKind() == attr::TypeNonNull; } |
| 10580 | }; |
| 10581 | |
| 10582 | class TypeNullUnspecifiedAttr : public TypeAttr { |
| 10583 | public: |
| 10584 | // Factory methods |
| 10585 | static TypeNullUnspecifiedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10586 | static TypeNullUnspecifiedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10587 | static TypeNullUnspecifiedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10588 | static TypeNullUnspecifiedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10589 | |
| 10590 | // Constructors |
| 10591 | TypeNullUnspecifiedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10592 | ); |
| 10593 | |
| 10594 | TypeNullUnspecifiedAttr *clone(ASTContext &C) const; |
| 10595 | void printPretty(raw_ostream &OS, |
| 10596 | const PrintingPolicy &Policy) const; |
| 10597 | const char *getSpelling() const; |
| 10598 | |
| 10599 | |
| 10600 | static bool classof(const Attr *A) { return A->getKind() == attr::TypeNullUnspecified; } |
| 10601 | }; |
| 10602 | |
| 10603 | class TypeNullableAttr : public TypeAttr { |
| 10604 | public: |
| 10605 | // Factory methods |
| 10606 | static TypeNullableAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10607 | static TypeNullableAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10608 | static TypeNullableAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10609 | static TypeNullableAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10610 | |
| 10611 | // Constructors |
| 10612 | TypeNullableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10613 | ); |
| 10614 | |
| 10615 | TypeNullableAttr *clone(ASTContext &C) const; |
| 10616 | void printPretty(raw_ostream &OS, |
| 10617 | const PrintingPolicy &Policy) const; |
| 10618 | const char *getSpelling() const; |
| 10619 | |
| 10620 | |
| 10621 | static bool classof(const Attr *A) { return A->getKind() == attr::TypeNullable; } |
| 10622 | }; |
| 10623 | |
| 10624 | class TypeNullableResultAttr : public TypeAttr { |
| 10625 | public: |
| 10626 | // Factory methods |
| 10627 | static TypeNullableResultAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10628 | static TypeNullableResultAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10629 | static TypeNullableResultAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10630 | static TypeNullableResultAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10631 | |
| 10632 | // Constructors |
| 10633 | TypeNullableResultAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10634 | ); |
| 10635 | |
| 10636 | TypeNullableResultAttr *clone(ASTContext &C) const; |
| 10637 | void printPretty(raw_ostream &OS, |
| 10638 | const PrintingPolicy &Policy) const; |
| 10639 | const char *getSpelling() const; |
| 10640 | |
| 10641 | |
| 10642 | static bool classof(const Attr *A) { return A->getKind() == attr::TypeNullableResult; } |
| 10643 | }; |
| 10644 | |
| 10645 | class TypeTagForDatatypeAttr : public InheritableAttr { |
| 10646 | IdentifierInfo * argumentKind; |
| 10647 | |
| 10648 | TypeSourceInfo * matchingCType; |
| 10649 | |
| 10650 | bool layoutCompatible; |
| 10651 | |
| 10652 | bool mustBeNull; |
| 10653 | |
| 10654 | public: |
| 10655 | enum Spelling { |
| 10656 | GNU_type_tag_for_datatype = 0, |
| 10657 | CXX11_clang_type_tag_for_datatype = 1, |
| 10658 | C2x_clang_type_tag_for_datatype = 2, |
| 10659 | SpellingNotCalculated = 15 |
| 10660 | |
| 10661 | }; |
| 10662 | |
| 10663 | // Factory methods |
| 10664 | static TypeTagForDatatypeAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * ArgumentKind, TypeSourceInfo * MatchingCType, bool LayoutCompatible, bool MustBeNull, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10665 | static TypeTagForDatatypeAttr *Create(ASTContext &Ctx, IdentifierInfo * ArgumentKind, TypeSourceInfo * MatchingCType, bool LayoutCompatible, bool MustBeNull, const AttributeCommonInfo &CommonInfo); |
| 10666 | static TypeTagForDatatypeAttr *CreateImplicit(ASTContext &Ctx, IdentifierInfo * ArgumentKind, TypeSourceInfo * MatchingCType, bool LayoutCompatible, bool MustBeNull, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10667 | static TypeTagForDatatypeAttr *Create(ASTContext &Ctx, IdentifierInfo * ArgumentKind, TypeSourceInfo * MatchingCType, bool LayoutCompatible, bool MustBeNull, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10668 | |
| 10669 | // Constructors |
| 10670 | TypeTagForDatatypeAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10671 | , IdentifierInfo * ArgumentKind |
| 10672 | , TypeSourceInfo * MatchingCType |
| 10673 | , bool LayoutCompatible |
| 10674 | , bool MustBeNull |
| 10675 | ); |
| 10676 | |
| 10677 | TypeTagForDatatypeAttr *clone(ASTContext &C) const; |
| 10678 | void printPretty(raw_ostream &OS, |
| 10679 | const PrintingPolicy &Policy) const; |
| 10680 | const char *getSpelling() const; |
| 10681 | IdentifierInfo * getArgumentKind() const { |
| 10682 | return argumentKind; |
| 10683 | } |
| 10684 | |
| 10685 | QualType getMatchingCType() const { |
| 10686 | return matchingCType->getType(); |
| 10687 | } TypeSourceInfo * getMatchingCTypeLoc() const { |
| 10688 | return matchingCType; |
| 10689 | } |
| 10690 | |
| 10691 | bool getLayoutCompatible() const { |
| 10692 | return layoutCompatible; |
| 10693 | } |
| 10694 | |
| 10695 | bool getMustBeNull() const { |
| 10696 | return mustBeNull; |
| 10697 | } |
| 10698 | |
| 10699 | |
| 10700 | |
| 10701 | static bool classof(const Attr *A) { return A->getKind() == attr::TypeTagForDatatype; } |
| 10702 | }; |
| 10703 | |
| 10704 | class TypeVisibilityAttr : public InheritableAttr { |
| 10705 | public: |
| 10706 | enum VisibilityType { |
| 10707 | Default, |
| 10708 | Hidden, |
| 10709 | Protected |
| 10710 | }; |
| 10711 | private: |
| 10712 | VisibilityType visibility; |
| 10713 | |
| 10714 | public: |
| 10715 | enum Spelling { |
| 10716 | GNU_type_visibility = 0, |
| 10717 | CXX11_clang_type_visibility = 1, |
| 10718 | C2x_clang_type_visibility = 2, |
| 10719 | SpellingNotCalculated = 15 |
| 10720 | |
| 10721 | }; |
| 10722 | |
| 10723 | // Factory methods |
| 10724 | static TypeVisibilityAttr *CreateImplicit(ASTContext &Ctx, VisibilityType Visibility, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10725 | static TypeVisibilityAttr *Create(ASTContext &Ctx, VisibilityType Visibility, const AttributeCommonInfo &CommonInfo); |
| 10726 | static TypeVisibilityAttr *CreateImplicit(ASTContext &Ctx, VisibilityType Visibility, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10727 | static TypeVisibilityAttr *Create(ASTContext &Ctx, VisibilityType Visibility, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10728 | |
| 10729 | // Constructors |
| 10730 | TypeVisibilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10731 | , VisibilityType Visibility |
| 10732 | ); |
| 10733 | |
| 10734 | TypeVisibilityAttr *clone(ASTContext &C) const; |
| 10735 | void printPretty(raw_ostream &OS, |
| 10736 | const PrintingPolicy &Policy) const; |
| 10737 | const char *getSpelling() const; |
| 10738 | VisibilityType getVisibility() const { |
| 10739 | return visibility; |
| 10740 | } |
| 10741 | |
| 10742 | static bool ConvertStrToVisibilityType(StringRef Val, VisibilityType &Out); |
| 10743 | static const char *ConvertVisibilityTypeToStr(VisibilityType Val); |
| 10744 | |
| 10745 | |
| 10746 | static bool classof(const Attr *A) { return A->getKind() == attr::TypeVisibility; } |
| 10747 | }; |
| 10748 | |
| 10749 | class UPtrAttr : public TypeAttr { |
| 10750 | public: |
| 10751 | // Factory methods |
| 10752 | static UPtrAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10753 | static UPtrAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10754 | static UPtrAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10755 | static UPtrAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10756 | |
| 10757 | // Constructors |
| 10758 | UPtrAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10759 | ); |
| 10760 | |
| 10761 | UPtrAttr *clone(ASTContext &C) const; |
| 10762 | void printPretty(raw_ostream &OS, |
| 10763 | const PrintingPolicy &Policy) const; |
| 10764 | const char *getSpelling() const; |
| 10765 | |
| 10766 | |
| 10767 | static bool classof(const Attr *A) { return A->getKind() == attr::UPtr; } |
| 10768 | }; |
| 10769 | |
| 10770 | class UnavailableAttr : public InheritableAttr { |
| 10771 | unsigned messageLength; |
| 10772 | char *message; |
| 10773 | |
| 10774 | public: |
| 10775 | enum ImplicitReason { |
| 10776 | IR_None, |
| 10777 | IR_ARCForbiddenType, |
| 10778 | IR_ForbiddenWeak, |
| 10779 | IR_ARCForbiddenConversion, |
| 10780 | IR_ARCInitReturnsUnrelated, |
| 10781 | IR_ARCFieldWithOwnership |
| 10782 | }; |
| 10783 | private: |
| 10784 | ImplicitReason implicitReason; |
| 10785 | |
| 10786 | public: |
| 10787 | enum Spelling { |
| 10788 | GNU_unavailable = 0, |
| 10789 | CXX11_clang_unavailable = 1, |
| 10790 | C2x_clang_unavailable = 2, |
| 10791 | SpellingNotCalculated = 15 |
| 10792 | |
| 10793 | }; |
| 10794 | |
| 10795 | // Factory methods |
| 10796 | static UnavailableAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Message, ImplicitReason ImplicitReason, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10797 | static UnavailableAttr *Create(ASTContext &Ctx, llvm::StringRef Message, ImplicitReason ImplicitReason, const AttributeCommonInfo &CommonInfo); |
| 10798 | static UnavailableAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Message, ImplicitReason ImplicitReason, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10799 | static UnavailableAttr *Create(ASTContext &Ctx, llvm::StringRef Message, ImplicitReason ImplicitReason, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10800 | static UnavailableAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Message, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10801 | static UnavailableAttr *Create(ASTContext &Ctx, llvm::StringRef Message, const AttributeCommonInfo &CommonInfo); |
| 10802 | static UnavailableAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Message, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10803 | static UnavailableAttr *Create(ASTContext &Ctx, llvm::StringRef Message, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10804 | |
| 10805 | // Constructors |
| 10806 | UnavailableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10807 | , llvm::StringRef Message |
| 10808 | , ImplicitReason ImplicitReason |
| 10809 | ); |
| 10810 | UnavailableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10811 | , llvm::StringRef Message |
| 10812 | ); |
| 10813 | UnavailableAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10814 | ); |
| 10815 | |
| 10816 | UnavailableAttr *clone(ASTContext &C) const; |
| 10817 | void printPretty(raw_ostream &OS, |
| 10818 | const PrintingPolicy &Policy) const; |
| 10819 | const char *getSpelling() const; |
| 10820 | llvm::StringRef getMessage() const { |
| 10821 | return llvm::StringRef(message, messageLength); |
| 10822 | } |
| 10823 | unsigned getMessageLength() const { |
| 10824 | return messageLength; |
| 10825 | } |
| 10826 | void setMessage(ASTContext &C, llvm::StringRef S) { |
| 10827 | messageLength = S.size(); |
| 10828 | this->message = new (C, 1) char [messageLength]; |
| 10829 | if (!S.empty()) |
| 10830 | std::memcpy(this->message, S.data(), messageLength); |
| 10831 | } |
| 10832 | |
| 10833 | ImplicitReason getImplicitReason() const { |
| 10834 | return implicitReason; |
| 10835 | } |
| 10836 | |
| 10837 | |
| 10838 | |
| 10839 | static bool classof(const Attr *A) { return A->getKind() == attr::Unavailable; } |
| 10840 | }; |
| 10841 | |
| 10842 | class UninitializedAttr : public InheritableAttr { |
| 10843 | public: |
| 10844 | enum Spelling { |
| 10845 | GNU_uninitialized = 0, |
| 10846 | CXX11_clang_uninitialized = 1, |
| 10847 | SpellingNotCalculated = 15 |
| 10848 | |
| 10849 | }; |
| 10850 | |
| 10851 | // Factory methods |
| 10852 | static UninitializedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10853 | static UninitializedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10854 | static UninitializedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10855 | static UninitializedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10856 | |
| 10857 | // Constructors |
| 10858 | UninitializedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10859 | ); |
| 10860 | |
| 10861 | UninitializedAttr *clone(ASTContext &C) const; |
| 10862 | void printPretty(raw_ostream &OS, |
| 10863 | const PrintingPolicy &Policy) const; |
| 10864 | const char *getSpelling() const; |
| 10865 | |
| 10866 | |
| 10867 | static bool classof(const Attr *A) { return A->getKind() == attr::Uninitialized; } |
| 10868 | }; |
| 10869 | |
| 10870 | class UnlikelyAttr : public StmtAttr { |
| 10871 | public: |
| 10872 | enum Spelling { |
| 10873 | CXX11_unlikely = 0, |
| 10874 | C2x_clang_unlikely = 1, |
| 10875 | SpellingNotCalculated = 15 |
| 10876 | |
| 10877 | }; |
| 10878 | |
| 10879 | // Factory methods |
| 10880 | static UnlikelyAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10881 | static UnlikelyAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10882 | static UnlikelyAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10883 | static UnlikelyAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10884 | |
| 10885 | // Constructors |
| 10886 | UnlikelyAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10887 | ); |
| 10888 | |
| 10889 | UnlikelyAttr *clone(ASTContext &C) const; |
| 10890 | void printPretty(raw_ostream &OS, |
| 10891 | const PrintingPolicy &Policy) const; |
| 10892 | const char *getSpelling() const; |
| 10893 | |
| 10894 | |
| 10895 | static bool classof(const Attr *A) { return A->getKind() == attr::Unlikely; } |
| 10896 | }; |
| 10897 | |
| 10898 | class UnusedAttr : public InheritableAttr { |
| 10899 | public: |
| 10900 | enum Spelling { |
| 10901 | CXX11_maybe_unused = 0, |
| 10902 | GNU_unused = 1, |
| 10903 | CXX11_gnu_unused = 2, |
| 10904 | C2x_gnu_unused = 3, |
| 10905 | C2x_maybe_unused = 4, |
| 10906 | SpellingNotCalculated = 15 |
| 10907 | |
| 10908 | }; |
| 10909 | |
| 10910 | // Factory methods |
| 10911 | static UnusedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10912 | static UnusedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10913 | static UnusedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, UnusedAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 10914 | static UnusedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, UnusedAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 10915 | |
| 10916 | // Constructors |
| 10917 | UnusedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10918 | ); |
| 10919 | |
| 10920 | UnusedAttr *clone(ASTContext &C) const; |
| 10921 | void printPretty(raw_ostream &OS, |
| 10922 | const PrintingPolicy &Policy) const; |
| 10923 | const char *getSpelling() const; |
| 10924 | Spelling getSemanticSpelling() const; |
| 10925 | |
| 10926 | |
| 10927 | static bool classof(const Attr *A) { return A->getKind() == attr::Unused; } |
| 10928 | }; |
| 10929 | |
| 10930 | class UseHandleAttr : public InheritableParamAttr { |
| 10931 | unsigned handleTypeLength; |
| 10932 | char *handleType; |
| 10933 | |
| 10934 | public: |
| 10935 | enum Spelling { |
| 10936 | GNU_use_handle = 0, |
| 10937 | CXX11_clang_use_handle = 1, |
| 10938 | C2x_clang_use_handle = 2, |
| 10939 | SpellingNotCalculated = 15 |
| 10940 | |
| 10941 | }; |
| 10942 | |
| 10943 | // Factory methods |
| 10944 | static UseHandleAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef HandleType, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10945 | static UseHandleAttr *Create(ASTContext &Ctx, llvm::StringRef HandleType, const AttributeCommonInfo &CommonInfo); |
| 10946 | static UseHandleAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef HandleType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10947 | static UseHandleAttr *Create(ASTContext &Ctx, llvm::StringRef HandleType, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10948 | |
| 10949 | // Constructors |
| 10950 | UseHandleAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10951 | , llvm::StringRef HandleType |
| 10952 | ); |
| 10953 | |
| 10954 | UseHandleAttr *clone(ASTContext &C) const; |
| 10955 | void printPretty(raw_ostream &OS, |
| 10956 | const PrintingPolicy &Policy) const; |
| 10957 | const char *getSpelling() const; |
| 10958 | llvm::StringRef getHandleType() const { |
| 10959 | return llvm::StringRef(handleType, handleTypeLength); |
| 10960 | } |
| 10961 | unsigned getHandleTypeLength() const { |
| 10962 | return handleTypeLength; |
| 10963 | } |
| 10964 | void setHandleType(ASTContext &C, llvm::StringRef S) { |
| 10965 | handleTypeLength = S.size(); |
| 10966 | this->handleType = new (C, 1) char [handleTypeLength]; |
| 10967 | if (!S.empty()) |
| 10968 | std::memcpy(this->handleType, S.data(), handleTypeLength); |
| 10969 | } |
| 10970 | |
| 10971 | |
| 10972 | |
| 10973 | static bool classof(const Attr *A) { return A->getKind() == attr::UseHandle; } |
| 10974 | }; |
| 10975 | |
| 10976 | class UsedAttr : public InheritableAttr { |
| 10977 | public: |
| 10978 | enum Spelling { |
| 10979 | GNU_used = 0, |
| 10980 | CXX11_gnu_used = 1, |
| 10981 | C2x_gnu_used = 2, |
| 10982 | SpellingNotCalculated = 15 |
| 10983 | |
| 10984 | }; |
| 10985 | |
| 10986 | // Factory methods |
| 10987 | static UsedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 10988 | static UsedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 10989 | static UsedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10990 | static UsedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 10991 | |
| 10992 | // Constructors |
| 10993 | UsedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 10994 | ); |
| 10995 | |
| 10996 | UsedAttr *clone(ASTContext &C) const; |
| 10997 | void printPretty(raw_ostream &OS, |
| 10998 | const PrintingPolicy &Policy) const; |
| 10999 | const char *getSpelling() const; |
| 11000 | |
| 11001 | |
| 11002 | static bool classof(const Attr *A) { return A->getKind() == attr::Used; } |
| 11003 | }; |
| 11004 | |
| 11005 | class UuidAttr : public InheritableAttr { |
| 11006 | unsigned guidLength; |
| 11007 | char *guid; |
| 11008 | |
| 11009 | MSGuidDecl * guidDecl; |
| 11010 | |
| 11011 | public: |
| 11012 | enum Spelling { |
| 11013 | Declspec_uuid = 0, |
| 11014 | Microsoft_uuid = 1, |
| 11015 | SpellingNotCalculated = 15 |
| 11016 | |
| 11017 | }; |
| 11018 | |
| 11019 | // Factory methods |
| 11020 | static UuidAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Guid, MSGuidDecl * GuidDecl, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11021 | static UuidAttr *Create(ASTContext &Ctx, llvm::StringRef Guid, MSGuidDecl * GuidDecl, const AttributeCommonInfo &CommonInfo); |
| 11022 | static UuidAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Guid, MSGuidDecl * GuidDecl, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11023 | static UuidAttr *Create(ASTContext &Ctx, llvm::StringRef Guid, MSGuidDecl * GuidDecl, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11024 | static UuidAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Guid, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11025 | static UuidAttr *Create(ASTContext &Ctx, llvm::StringRef Guid, const AttributeCommonInfo &CommonInfo); |
| 11026 | static UuidAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Guid, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11027 | static UuidAttr *Create(ASTContext &Ctx, llvm::StringRef Guid, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11028 | |
| 11029 | // Constructors |
| 11030 | UuidAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11031 | , llvm::StringRef Guid |
| 11032 | , MSGuidDecl * GuidDecl |
| 11033 | ); |
| 11034 | UuidAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11035 | , llvm::StringRef Guid |
| 11036 | ); |
| 11037 | |
| 11038 | UuidAttr *clone(ASTContext &C) const; |
| 11039 | void printPretty(raw_ostream &OS, |
| 11040 | const PrintingPolicy &Policy) const; |
| 11041 | const char *getSpelling() const; |
| 11042 | llvm::StringRef getGuid() const { |
| 11043 | return llvm::StringRef(guid, guidLength); |
| 11044 | } |
| 11045 | unsigned getGuidLength() const { |
| 11046 | return guidLength; |
| 11047 | } |
| 11048 | void setGuid(ASTContext &C, llvm::StringRef S) { |
| 11049 | guidLength = S.size(); |
| 11050 | this->guid = new (C, 1) char [guidLength]; |
| 11051 | if (!S.empty()) |
| 11052 | std::memcpy(this->guid, S.data(), guidLength); |
| 11053 | } |
| 11054 | |
| 11055 | MSGuidDecl * getGuidDecl() const { |
| 11056 | return guidDecl; |
| 11057 | } |
| 11058 | |
| 11059 | |
| 11060 | |
| 11061 | static bool classof(const Attr *A) { return A->getKind() == attr::Uuid; } |
| 11062 | }; |
| 11063 | |
| 11064 | class VecReturnAttr : public InheritableAttr { |
| 11065 | public: |
| 11066 | enum Spelling { |
| 11067 | GNU_vecreturn = 0, |
| 11068 | CXX11_clang_vecreturn = 1, |
| 11069 | SpellingNotCalculated = 15 |
| 11070 | |
| 11071 | }; |
| 11072 | |
| 11073 | // Factory methods |
| 11074 | static VecReturnAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11075 | static VecReturnAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 11076 | static VecReturnAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11077 | static VecReturnAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11078 | |
| 11079 | // Constructors |
| 11080 | VecReturnAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11081 | ); |
| 11082 | |
| 11083 | VecReturnAttr *clone(ASTContext &C) const; |
| 11084 | void printPretty(raw_ostream &OS, |
| 11085 | const PrintingPolicy &Policy) const; |
| 11086 | const char *getSpelling() const; |
| 11087 | |
| 11088 | |
| 11089 | static bool classof(const Attr *A) { return A->getKind() == attr::VecReturn; } |
| 11090 | }; |
| 11091 | |
| 11092 | class VecTypeHintAttr : public InheritableAttr { |
| 11093 | TypeSourceInfo * typeHint; |
| 11094 | |
| 11095 | public: |
| 11096 | // Factory methods |
| 11097 | static VecTypeHintAttr *CreateImplicit(ASTContext &Ctx, TypeSourceInfo * TypeHint, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11098 | static VecTypeHintAttr *Create(ASTContext &Ctx, TypeSourceInfo * TypeHint, const AttributeCommonInfo &CommonInfo); |
| 11099 | static VecTypeHintAttr *CreateImplicit(ASTContext &Ctx, TypeSourceInfo * TypeHint, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11100 | static VecTypeHintAttr *Create(ASTContext &Ctx, TypeSourceInfo * TypeHint, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11101 | |
| 11102 | // Constructors |
| 11103 | VecTypeHintAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11104 | , TypeSourceInfo * TypeHint |
| 11105 | ); |
| 11106 | |
| 11107 | VecTypeHintAttr *clone(ASTContext &C) const; |
| 11108 | void printPretty(raw_ostream &OS, |
| 11109 | const PrintingPolicy &Policy) const; |
| 11110 | const char *getSpelling() const; |
| 11111 | QualType getTypeHint() const { |
| 11112 | return typeHint->getType(); |
| 11113 | } TypeSourceInfo * getTypeHintLoc() const { |
| 11114 | return typeHint; |
| 11115 | } |
| 11116 | |
| 11117 | |
| 11118 | |
| 11119 | static bool classof(const Attr *A) { return A->getKind() == attr::VecTypeHint; } |
| 11120 | }; |
| 11121 | |
| 11122 | class VectorCallAttr : public InheritableAttr { |
| 11123 | public: |
| 11124 | enum Spelling { |
| 11125 | GNU_vectorcall = 0, |
| 11126 | CXX11_clang_vectorcall = 1, |
| 11127 | C2x_clang_vectorcall = 2, |
| 11128 | Keyword_vectorcall = 3, |
| 11129 | SpellingNotCalculated = 15 |
| 11130 | |
| 11131 | }; |
| 11132 | |
| 11133 | // Factory methods |
| 11134 | static VectorCallAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11135 | static VectorCallAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 11136 | static VectorCallAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11137 | static VectorCallAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11138 | |
| 11139 | // Constructors |
| 11140 | VectorCallAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11141 | ); |
| 11142 | |
| 11143 | VectorCallAttr *clone(ASTContext &C) const; |
| 11144 | void printPretty(raw_ostream &OS, |
| 11145 | const PrintingPolicy &Policy) const; |
| 11146 | const char *getSpelling() const; |
| 11147 | |
| 11148 | |
| 11149 | static bool classof(const Attr *A) { return A->getKind() == attr::VectorCall; } |
| 11150 | }; |
| 11151 | |
| 11152 | class VisibilityAttr : public InheritableAttr { |
| 11153 | public: |
| 11154 | enum VisibilityType { |
| 11155 | Default, |
| 11156 | Hidden, |
| 11157 | Protected |
| 11158 | }; |
| 11159 | private: |
| 11160 | VisibilityType visibility; |
| 11161 | |
| 11162 | public: |
| 11163 | enum Spelling { |
| 11164 | GNU_visibility = 0, |
| 11165 | CXX11_gnu_visibility = 1, |
| 11166 | C2x_gnu_visibility = 2, |
| 11167 | SpellingNotCalculated = 15 |
| 11168 | |
| 11169 | }; |
| 11170 | |
| 11171 | // Factory methods |
| 11172 | static VisibilityAttr *CreateImplicit(ASTContext &Ctx, VisibilityType Visibility, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11173 | static VisibilityAttr *Create(ASTContext &Ctx, VisibilityType Visibility, const AttributeCommonInfo &CommonInfo); |
| 11174 | static VisibilityAttr *CreateImplicit(ASTContext &Ctx, VisibilityType Visibility, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11175 | static VisibilityAttr *Create(ASTContext &Ctx, VisibilityType Visibility, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11176 | |
| 11177 | // Constructors |
| 11178 | VisibilityAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11179 | , VisibilityType Visibility |
| 11180 | ); |
| 11181 | |
| 11182 | VisibilityAttr *clone(ASTContext &C) const; |
| 11183 | void printPretty(raw_ostream &OS, |
| 11184 | const PrintingPolicy &Policy) const; |
| 11185 | const char *getSpelling() const; |
| 11186 | VisibilityType getVisibility() const { |
| 11187 | return visibility; |
| 11188 | } |
| 11189 | |
| 11190 | static bool ConvertStrToVisibilityType(StringRef Val, VisibilityType &Out); |
| 11191 | static const char *ConvertVisibilityTypeToStr(VisibilityType Val); |
| 11192 | |
| 11193 | |
| 11194 | static bool classof(const Attr *A) { return A->getKind() == attr::Visibility; } |
| 11195 | }; |
| 11196 | |
| 11197 | class WarnUnusedAttr : public InheritableAttr { |
| 11198 | public: |
| 11199 | enum Spelling { |
| 11200 | GNU_warn_unused = 0, |
| 11201 | CXX11_gnu_warn_unused = 1, |
| 11202 | C2x_gnu_warn_unused = 2, |
| 11203 | SpellingNotCalculated = 15 |
| 11204 | |
| 11205 | }; |
| 11206 | |
| 11207 | // Factory methods |
| 11208 | static WarnUnusedAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11209 | static WarnUnusedAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 11210 | static WarnUnusedAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11211 | static WarnUnusedAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11212 | |
| 11213 | // Constructors |
| 11214 | WarnUnusedAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11215 | ); |
| 11216 | |
| 11217 | WarnUnusedAttr *clone(ASTContext &C) const; |
| 11218 | void printPretty(raw_ostream &OS, |
| 11219 | const PrintingPolicy &Policy) const; |
| 11220 | const char *getSpelling() const; |
| 11221 | |
| 11222 | |
| 11223 | static bool classof(const Attr *A) { return A->getKind() == attr::WarnUnused; } |
| 11224 | }; |
| 11225 | |
| 11226 | class WarnUnusedResultAttr : public InheritableAttr { |
| 11227 | unsigned messageLength; |
| 11228 | char *message; |
| 11229 | |
| 11230 | public: |
| 11231 | enum Spelling { |
| 11232 | CXX11_nodiscard = 0, |
| 11233 | C2x_nodiscard = 1, |
| 11234 | CXX11_clang_warn_unused_result = 2, |
| 11235 | GNU_warn_unused_result = 3, |
| 11236 | CXX11_gnu_warn_unused_result = 4, |
| 11237 | C2x_gnu_warn_unused_result = 5, |
| 11238 | SpellingNotCalculated = 15 |
| 11239 | |
| 11240 | }; |
| 11241 | |
| 11242 | // Factory methods |
| 11243 | static WarnUnusedResultAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Message, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11244 | static WarnUnusedResultAttr *Create(ASTContext &Ctx, llvm::StringRef Message, const AttributeCommonInfo &CommonInfo); |
| 11245 | static WarnUnusedResultAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Message, SourceRange Range, AttributeCommonInfo::Syntax Syntax, WarnUnusedResultAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 11246 | static WarnUnusedResultAttr *Create(ASTContext &Ctx, llvm::StringRef Message, SourceRange Range, AttributeCommonInfo::Syntax Syntax, WarnUnusedResultAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 11247 | |
| 11248 | // Constructors |
| 11249 | WarnUnusedResultAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11250 | , llvm::StringRef Message |
| 11251 | ); |
| 11252 | WarnUnusedResultAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11253 | ); |
| 11254 | |
| 11255 | WarnUnusedResultAttr *clone(ASTContext &C) const; |
| 11256 | void printPretty(raw_ostream &OS, |
| 11257 | const PrintingPolicy &Policy) const; |
| 11258 | const char *getSpelling() const; |
| 11259 | Spelling getSemanticSpelling() const; |
| 11260 | llvm::StringRef getMessage() const { |
| 11261 | return llvm::StringRef(message, messageLength); |
| 11262 | } |
| 11263 | unsigned getMessageLength() const { |
| 11264 | return messageLength; |
| 11265 | } |
| 11266 | void setMessage(ASTContext &C, llvm::StringRef S) { |
| 11267 | messageLength = S.size(); |
| 11268 | this->message = new (C, 1) char [messageLength]; |
| 11269 | if (!S.empty()) |
| 11270 | std::memcpy(this->message, S.data(), messageLength); |
| 11271 | } |
| 11272 | |
| 11273 | |
| 11274 | // Check whether this the C++11 nodiscard version, even in non C++11 |
| 11275 | // spellings. |
| 11276 | bool IsCXX11NoDiscard() const { |
| 11277 | return this->getSemanticSpelling() == CXX11_nodiscard; |
| 11278 | } |
| 11279 | |
| 11280 | |
| 11281 | static bool classof(const Attr *A) { return A->getKind() == attr::WarnUnusedResult; } |
| 11282 | }; |
| 11283 | |
| 11284 | class WeakAttr : public InheritableAttr { |
| 11285 | public: |
| 11286 | enum Spelling { |
| 11287 | GNU_weak = 0, |
| 11288 | CXX11_gnu_weak = 1, |
| 11289 | C2x_gnu_weak = 2, |
| 11290 | SpellingNotCalculated = 15 |
| 11291 | |
| 11292 | }; |
| 11293 | |
| 11294 | // Factory methods |
| 11295 | static WeakAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11296 | static WeakAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 11297 | static WeakAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11298 | static WeakAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11299 | |
| 11300 | // Constructors |
| 11301 | WeakAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11302 | ); |
| 11303 | |
| 11304 | WeakAttr *clone(ASTContext &C) const; |
| 11305 | void printPretty(raw_ostream &OS, |
| 11306 | const PrintingPolicy &Policy) const; |
| 11307 | const char *getSpelling() const; |
| 11308 | |
| 11309 | |
| 11310 | static bool classof(const Attr *A) { return A->getKind() == attr::Weak; } |
| 11311 | }; |
| 11312 | |
| 11313 | class WeakImportAttr : public InheritableAttr { |
| 11314 | public: |
| 11315 | enum Spelling { |
| 11316 | GNU_weak_import = 0, |
| 11317 | CXX11_clang_weak_import = 1, |
| 11318 | C2x_clang_weak_import = 2, |
| 11319 | SpellingNotCalculated = 15 |
| 11320 | |
| 11321 | }; |
| 11322 | |
| 11323 | // Factory methods |
| 11324 | static WeakImportAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11325 | static WeakImportAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 11326 | static WeakImportAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11327 | static WeakImportAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11328 | |
| 11329 | // Constructors |
| 11330 | WeakImportAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11331 | ); |
| 11332 | |
| 11333 | WeakImportAttr *clone(ASTContext &C) const; |
| 11334 | void printPretty(raw_ostream &OS, |
| 11335 | const PrintingPolicy &Policy) const; |
| 11336 | const char *getSpelling() const; |
| 11337 | |
| 11338 | |
| 11339 | static bool classof(const Attr *A) { return A->getKind() == attr::WeakImport; } |
| 11340 | }; |
| 11341 | |
| 11342 | class WeakRefAttr : public InheritableAttr { |
| 11343 | unsigned aliaseeLength; |
| 11344 | char *aliasee; |
| 11345 | |
| 11346 | public: |
| 11347 | enum Spelling { |
| 11348 | GNU_weakref = 0, |
| 11349 | CXX11_gnu_weakref = 1, |
| 11350 | C2x_gnu_weakref = 2, |
| 11351 | SpellingNotCalculated = 15 |
| 11352 | |
| 11353 | }; |
| 11354 | |
| 11355 | // Factory methods |
| 11356 | static WeakRefAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Aliasee, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11357 | static WeakRefAttr *Create(ASTContext &Ctx, llvm::StringRef Aliasee, const AttributeCommonInfo &CommonInfo); |
| 11358 | static WeakRefAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef Aliasee, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11359 | static WeakRefAttr *Create(ASTContext &Ctx, llvm::StringRef Aliasee, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11360 | |
| 11361 | // Constructors |
| 11362 | WeakRefAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11363 | , llvm::StringRef Aliasee |
| 11364 | ); |
| 11365 | WeakRefAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11366 | ); |
| 11367 | |
| 11368 | WeakRefAttr *clone(ASTContext &C) const; |
| 11369 | void printPretty(raw_ostream &OS, |
| 11370 | const PrintingPolicy &Policy) const; |
| 11371 | const char *getSpelling() const; |
| 11372 | llvm::StringRef getAliasee() const { |
| 11373 | return llvm::StringRef(aliasee, aliaseeLength); |
| 11374 | } |
| 11375 | unsigned getAliaseeLength() const { |
| 11376 | return aliaseeLength; |
| 11377 | } |
| 11378 | void setAliasee(ASTContext &C, llvm::StringRef S) { |
| 11379 | aliaseeLength = S.size(); |
| 11380 | this->aliasee = new (C, 1) char [aliaseeLength]; |
| 11381 | if (!S.empty()) |
| 11382 | std::memcpy(this->aliasee, S.data(), aliaseeLength); |
| 11383 | } |
| 11384 | |
| 11385 | |
| 11386 | |
| 11387 | static bool classof(const Attr *A) { return A->getKind() == attr::WeakRef; } |
| 11388 | }; |
| 11389 | |
| 11390 | class WebAssemblyExportNameAttr : public InheritableAttr { |
| 11391 | unsigned exportNameLength; |
| 11392 | char *exportName; |
| 11393 | |
| 11394 | public: |
| 11395 | enum Spelling { |
| 11396 | GNU_export_name = 0, |
| 11397 | CXX11_clang_export_name = 1, |
| 11398 | C2x_clang_export_name = 2, |
| 11399 | SpellingNotCalculated = 15 |
| 11400 | |
| 11401 | }; |
| 11402 | |
| 11403 | // Factory methods |
| 11404 | static WebAssemblyExportNameAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef ExportName, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11405 | static WebAssemblyExportNameAttr *Create(ASTContext &Ctx, llvm::StringRef ExportName, const AttributeCommonInfo &CommonInfo); |
| 11406 | static WebAssemblyExportNameAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef ExportName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11407 | static WebAssemblyExportNameAttr *Create(ASTContext &Ctx, llvm::StringRef ExportName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11408 | |
| 11409 | // Constructors |
| 11410 | WebAssemblyExportNameAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11411 | , llvm::StringRef ExportName |
| 11412 | ); |
| 11413 | |
| 11414 | WebAssemblyExportNameAttr *clone(ASTContext &C) const; |
| 11415 | void printPretty(raw_ostream &OS, |
| 11416 | const PrintingPolicy &Policy) const; |
| 11417 | const char *getSpelling() const; |
| 11418 | llvm::StringRef getExportName() const { |
| 11419 | return llvm::StringRef(exportName, exportNameLength); |
| 11420 | } |
| 11421 | unsigned getExportNameLength() const { |
| 11422 | return exportNameLength; |
| 11423 | } |
| 11424 | void setExportName(ASTContext &C, llvm::StringRef S) { |
| 11425 | exportNameLength = S.size(); |
| 11426 | this->exportName = new (C, 1) char [exportNameLength]; |
| 11427 | if (!S.empty()) |
| 11428 | std::memcpy(this->exportName, S.data(), exportNameLength); |
| 11429 | } |
| 11430 | |
| 11431 | |
| 11432 | |
| 11433 | static bool classof(const Attr *A) { return A->getKind() == attr::WebAssemblyExportName; } |
| 11434 | }; |
| 11435 | |
| 11436 | class WebAssemblyImportModuleAttr : public InheritableAttr { |
| 11437 | unsigned importModuleLength; |
| 11438 | char *importModule; |
| 11439 | |
| 11440 | public: |
| 11441 | enum Spelling { |
| 11442 | GNU_import_module = 0, |
| 11443 | CXX11_clang_import_module = 1, |
| 11444 | C2x_clang_import_module = 2, |
| 11445 | SpellingNotCalculated = 15 |
| 11446 | |
| 11447 | }; |
| 11448 | |
| 11449 | // Factory methods |
| 11450 | static WebAssemblyImportModuleAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef ImportModule, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11451 | static WebAssemblyImportModuleAttr *Create(ASTContext &Ctx, llvm::StringRef ImportModule, const AttributeCommonInfo &CommonInfo); |
| 11452 | static WebAssemblyImportModuleAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef ImportModule, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11453 | static WebAssemblyImportModuleAttr *Create(ASTContext &Ctx, llvm::StringRef ImportModule, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11454 | |
| 11455 | // Constructors |
| 11456 | WebAssemblyImportModuleAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11457 | , llvm::StringRef ImportModule |
| 11458 | ); |
| 11459 | |
| 11460 | WebAssemblyImportModuleAttr *clone(ASTContext &C) const; |
| 11461 | void printPretty(raw_ostream &OS, |
| 11462 | const PrintingPolicy &Policy) const; |
| 11463 | const char *getSpelling() const; |
| 11464 | llvm::StringRef getImportModule() const { |
| 11465 | return llvm::StringRef(importModule, importModuleLength); |
| 11466 | } |
| 11467 | unsigned getImportModuleLength() const { |
| 11468 | return importModuleLength; |
| 11469 | } |
| 11470 | void setImportModule(ASTContext &C, llvm::StringRef S) { |
| 11471 | importModuleLength = S.size(); |
| 11472 | this->importModule = new (C, 1) char [importModuleLength]; |
| 11473 | if (!S.empty()) |
| 11474 | std::memcpy(this->importModule, S.data(), importModuleLength); |
| 11475 | } |
| 11476 | |
| 11477 | |
| 11478 | |
| 11479 | static bool classof(const Attr *A) { return A->getKind() == attr::WebAssemblyImportModule; } |
| 11480 | }; |
| 11481 | |
| 11482 | class WebAssemblyImportNameAttr : public InheritableAttr { |
| 11483 | unsigned importNameLength; |
| 11484 | char *importName; |
| 11485 | |
| 11486 | public: |
| 11487 | enum Spelling { |
| 11488 | GNU_import_name = 0, |
| 11489 | CXX11_clang_import_name = 1, |
| 11490 | C2x_clang_import_name = 2, |
| 11491 | SpellingNotCalculated = 15 |
| 11492 | |
| 11493 | }; |
| 11494 | |
| 11495 | // Factory methods |
| 11496 | static WebAssemblyImportNameAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef ImportName, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11497 | static WebAssemblyImportNameAttr *Create(ASTContext &Ctx, llvm::StringRef ImportName, const AttributeCommonInfo &CommonInfo); |
| 11498 | static WebAssemblyImportNameAttr *CreateImplicit(ASTContext &Ctx, llvm::StringRef ImportName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11499 | static WebAssemblyImportNameAttr *Create(ASTContext &Ctx, llvm::StringRef ImportName, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11500 | |
| 11501 | // Constructors |
| 11502 | WebAssemblyImportNameAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11503 | , llvm::StringRef ImportName |
| 11504 | ); |
| 11505 | |
| 11506 | WebAssemblyImportNameAttr *clone(ASTContext &C) const; |
| 11507 | void printPretty(raw_ostream &OS, |
| 11508 | const PrintingPolicy &Policy) const; |
| 11509 | const char *getSpelling() const; |
| 11510 | llvm::StringRef getImportName() const { |
| 11511 | return llvm::StringRef(importName, importNameLength); |
| 11512 | } |
| 11513 | unsigned getImportNameLength() const { |
| 11514 | return importNameLength; |
| 11515 | } |
| 11516 | void setImportName(ASTContext &C, llvm::StringRef S) { |
| 11517 | importNameLength = S.size(); |
| 11518 | this->importName = new (C, 1) char [importNameLength]; |
| 11519 | if (!S.empty()) |
| 11520 | std::memcpy(this->importName, S.data(), importNameLength); |
| 11521 | } |
| 11522 | |
| 11523 | |
| 11524 | |
| 11525 | static bool classof(const Attr *A) { return A->getKind() == attr::WebAssemblyImportName; } |
| 11526 | }; |
| 11527 | |
| 11528 | class WorkGroupSizeHintAttr : public InheritableAttr { |
| 11529 | unsigned xDim; |
| 11530 | |
| 11531 | unsigned yDim; |
| 11532 | |
| 11533 | unsigned zDim; |
| 11534 | |
| 11535 | public: |
| 11536 | // Factory methods |
| 11537 | static WorkGroupSizeHintAttr *CreateImplicit(ASTContext &Ctx, unsigned XDim, unsigned YDim, unsigned ZDim, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11538 | static WorkGroupSizeHintAttr *Create(ASTContext &Ctx, unsigned XDim, unsigned YDim, unsigned ZDim, const AttributeCommonInfo &CommonInfo); |
| 11539 | static WorkGroupSizeHintAttr *CreateImplicit(ASTContext &Ctx, unsigned XDim, unsigned YDim, unsigned ZDim, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11540 | static WorkGroupSizeHintAttr *Create(ASTContext &Ctx, unsigned XDim, unsigned YDim, unsigned ZDim, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11541 | |
| 11542 | // Constructors |
| 11543 | WorkGroupSizeHintAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11544 | , unsigned XDim |
| 11545 | , unsigned YDim |
| 11546 | , unsigned ZDim |
| 11547 | ); |
| 11548 | |
| 11549 | WorkGroupSizeHintAttr *clone(ASTContext &C) const; |
| 11550 | void printPretty(raw_ostream &OS, |
| 11551 | const PrintingPolicy &Policy) const; |
| 11552 | const char *getSpelling() const; |
| 11553 | unsigned getXDim() const { |
| 11554 | return xDim; |
| 11555 | } |
| 11556 | |
| 11557 | unsigned getYDim() const { |
| 11558 | return yDim; |
| 11559 | } |
| 11560 | |
| 11561 | unsigned getZDim() const { |
| 11562 | return zDim; |
| 11563 | } |
| 11564 | |
| 11565 | |
| 11566 | |
| 11567 | static bool classof(const Attr *A) { return A->getKind() == attr::WorkGroupSizeHint; } |
| 11568 | }; |
| 11569 | |
| 11570 | class X86ForceAlignArgPointerAttr : public InheritableAttr { |
| 11571 | public: |
| 11572 | enum Spelling { |
| 11573 | GNU_force_align_arg_pointer = 0, |
| 11574 | CXX11_gnu_force_align_arg_pointer = 1, |
| 11575 | C2x_gnu_force_align_arg_pointer = 2, |
| 11576 | SpellingNotCalculated = 15 |
| 11577 | |
| 11578 | }; |
| 11579 | |
| 11580 | // Factory methods |
| 11581 | static X86ForceAlignArgPointerAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11582 | static X86ForceAlignArgPointerAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 11583 | static X86ForceAlignArgPointerAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11584 | static X86ForceAlignArgPointerAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11585 | |
| 11586 | // Constructors |
| 11587 | X86ForceAlignArgPointerAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11588 | ); |
| 11589 | |
| 11590 | X86ForceAlignArgPointerAttr *clone(ASTContext &C) const; |
| 11591 | void printPretty(raw_ostream &OS, |
| 11592 | const PrintingPolicy &Policy) const; |
| 11593 | const char *getSpelling() const; |
| 11594 | |
| 11595 | |
| 11596 | static bool classof(const Attr *A) { return A->getKind() == attr::X86ForceAlignArgPointer; } |
| 11597 | }; |
| 11598 | |
| 11599 | class XRayInstrumentAttr : public InheritableAttr { |
| 11600 | public: |
| 11601 | enum Spelling { |
| 11602 | GNU_xray_always_instrument = 0, |
| 11603 | CXX11_clang_xray_always_instrument = 1, |
| 11604 | C2x_clang_xray_always_instrument = 2, |
| 11605 | GNU_xray_never_instrument = 3, |
| 11606 | CXX11_clang_xray_never_instrument = 4, |
| 11607 | C2x_clang_xray_never_instrument = 5, |
| 11608 | SpellingNotCalculated = 15 |
| 11609 | |
| 11610 | }; |
| 11611 | |
| 11612 | // Factory methods |
| 11613 | static XRayInstrumentAttr *CreateImplicit(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11614 | static XRayInstrumentAttr *Create(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo); |
| 11615 | static XRayInstrumentAttr *CreateImplicit(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, XRayInstrumentAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 11616 | static XRayInstrumentAttr *Create(ASTContext &Ctx, SourceRange Range, AttributeCommonInfo::Syntax Syntax, XRayInstrumentAttr::Spelling S = static_cast<Spelling>(SpellingNotCalculated)); |
| 11617 | |
| 11618 | // Constructors |
| 11619 | XRayInstrumentAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11620 | ); |
| 11621 | |
| 11622 | XRayInstrumentAttr *clone(ASTContext &C) const; |
| 11623 | void printPretty(raw_ostream &OS, |
| 11624 | const PrintingPolicy &Policy) const; |
| 11625 | const char *getSpelling() const; |
| 11626 | Spelling getSemanticSpelling() const; |
| 11627 | bool alwaysXRayInstrument() const { return getAttributeSpellingListIndex() == 0 || |
| 11628 | getAttributeSpellingListIndex() == 1 || |
| 11629 | getAttributeSpellingListIndex() == 2; } |
| 11630 | bool neverXRayInstrument() const { return getAttributeSpellingListIndex() == 3 || |
| 11631 | getAttributeSpellingListIndex() == 4 || |
| 11632 | getAttributeSpellingListIndex() == 5; } |
| 11633 | |
| 11634 | |
| 11635 | static bool classof(const Attr *A) { return A->getKind() == attr::XRayInstrument; } |
| 11636 | }; |
| 11637 | |
| 11638 | class XRayLogArgsAttr : public InheritableAttr { |
| 11639 | unsigned argumentCount; |
| 11640 | |
| 11641 | public: |
| 11642 | enum Spelling { |
| 11643 | GNU_xray_log_args = 0, |
| 11644 | CXX11_clang_xray_log_args = 1, |
| 11645 | C2x_clang_xray_log_args = 2, |
| 11646 | SpellingNotCalculated = 15 |
| 11647 | |
| 11648 | }; |
| 11649 | |
| 11650 | // Factory methods |
| 11651 | static XRayLogArgsAttr *CreateImplicit(ASTContext &Ctx, unsigned ArgumentCount, const AttributeCommonInfo &CommonInfo = {SourceRange{}}); |
| 11652 | static XRayLogArgsAttr *Create(ASTContext &Ctx, unsigned ArgumentCount, const AttributeCommonInfo &CommonInfo); |
| 11653 | static XRayLogArgsAttr *CreateImplicit(ASTContext &Ctx, unsigned ArgumentCount, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11654 | static XRayLogArgsAttr *Create(ASTContext &Ctx, unsigned ArgumentCount, SourceRange Range, AttributeCommonInfo::Syntax Syntax); |
| 11655 | |
| 11656 | // Constructors |
| 11657 | XRayLogArgsAttr(ASTContext &Ctx, const AttributeCommonInfo &CommonInfo |
| 11658 | , unsigned ArgumentCount |
| 11659 | ); |
| 11660 | |
| 11661 | XRayLogArgsAttr *clone(ASTContext &C) const; |
| 11662 | void printPretty(raw_ostream &OS, |
| 11663 | const PrintingPolicy &Policy) const; |
| 11664 | const char *getSpelling() const; |
| 11665 | unsigned getArgumentCount() const { |
| 11666 | return argumentCount; |
| 11667 | } |
| 11668 | |
| 11669 | |
| 11670 | |
| 11671 | static bool classof(const Attr *A) { return A->getKind() == attr::XRayLogArgs; } |
| 11672 | }; |
| 11673 | |
| 11674 | #endif // LLVM_CLANG_ATTR_CLASSES_INC |
| 11675 | |